CN110263099B - Data synchronization flow adjustment method, device, equipment and storage medium - Google Patents
Data synchronization flow adjustment method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN110263099B CN110263099B CN201910541359.2A CN201910541359A CN110263099B CN 110263099 B CN110263099 B CN 110263099B CN 201910541359 A CN201910541359 A CN 201910541359A CN 110263099 B CN110263099 B CN 110263099B
- Authority
- CN
- China
- Prior art keywords
- storage cluster
- backup
- cluster
- backup storage
- upper limit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3006—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/80—Database-specific techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/875—Monitoring of systems including the internet
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Mathematical Physics (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present disclosure relates to a data synchronization traffic adjustment method, apparatus, device, and storage medium, where the method is applied to a distributed database, where the distributed database includes a main storage cluster and a backup storage cluster, the main storage cluster is used to obtain data from a storage log of the distributed database, and synchronize the data to the backup storage cluster for backup, and the method includes: monitoring a scale ratio between the primary storage cluster and the backup storage cluster; when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio. The technical scheme provided by the disclosure can realize automatic flow adjustment of data synchronization in the distributed database, and reduce manual operation.
Description
Technical Field
The present disclosure relates to the field of distributed storage technologies, and in particular, to a method, an apparatus, a device, and a storage medium for data synchronization flow adjustment.
Background
Distributed databases often have a need for multi-cluster synchronization data. The master cluster typically reads data from the log asynchronously and writes to the backup cluster. However, the sizes of the primary cluster and the backup cluster are not the same, or the data of the service is not the same, and the synchronization to the backup cluster completely according to the traffic of the primary cluster may cause the pressure of the backup cluster to be too large. Current solutions typically limit the synchronization. However, the level of current limiting needs to be customized manually, and the synchronous current limiting needs to be adjusted manually when the cluster is enlarged or reduced, so that the operation is inconvenient.
Disclosure of Invention
The disclosure provides a data synchronization flow adjustment method, a data synchronization flow adjustment device, data synchronization equipment and a storage medium, which are used for realizing automatic flow adjustment of data synchronization in a distributed database and reducing manual operation.
According to a first aspect of the embodiments of the present disclosure, a traffic adjustment method for data synchronization is provided, where the method is applied to a distributed database, where the distributed database includes a primary storage cluster and a backup storage cluster, the primary storage cluster is configured to obtain data from a storage log of the distributed database, and synchronize the data to the backup storage cluster for backup, and the method includes:
monitoring a scale ratio between the primary storage cluster and the backup storage cluster; when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio.
Optionally, the monitoring a scale ratio between the primary storage cluster and the backup storage cluster includes:
monitoring whether the backup storage cluster is scaled up or down.
Optionally, the monitoring a scale ratio between the primary storage cluster and the backup storage cluster includes:
and monitoring the number of the storage media with the residual storage space larger than a first preset threshold value in the backup storage cluster.
Optionally, the monitoring a scale ratio between the primary storage cluster and the backup storage cluster includes:
and monitoring the number of the storage media with the processing resource occupancy rate lower than a second preset threshold value in the backup storage cluster.
According to a second aspect of the embodiments of the present disclosure, there is provided a traffic adjusting apparatus for data synchronization, the apparatus is applied to a distributed database, the distributed database further includes a primary storage cluster and a backup storage cluster, the primary storage cluster is configured to obtain data from a storage log of the distributed database, and synchronize the data to the backup storage cluster for backup, the apparatus includes:
a cluster size monitoring module configured to monitor a scale ratio between the primary storage cluster and the backup storage cluster.
And the flow adjusting module is configured to adjust the upper limit value of the flow used by the data to synchronize from the main storage cluster to the backup storage cluster based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow when the scale ratio is changed, so that the upper limit value is matched with the changed scale ratio.
Optionally, the cluster size monitoring module includes:
a first monitoring submodule configured to monitor whether the backup storage cluster is scaled up or down.
Optionally, the cluster size monitoring module includes:
and the second monitoring submodule is configured to monitor the number of the storage media with the remaining storage space larger than a first preset threshold value in the backup storage cluster.
Optionally, the cluster size monitoring module includes:
and the third monitoring submodule is configured to monitor the number of the storage media in the backup storage cluster, wherein the processing resource occupancy rate of the storage media is lower than a second preset threshold value.
According to a third aspect of embodiments of the present disclosure, there is provided a computer device comprising:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to:
monitoring a scale ratio between the primary storage cluster and the backup storage cluster; when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of:
monitoring a scale ratio between the primary storage cluster and the backup storage cluster; when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
as can be seen from the above aspects, in the embodiments of the present disclosure, by monitoring the scale ratio between the main storage cluster and the backup storage cluster, and when it is monitored that the scale ratio between the main storage cluster and the backup storage cluster changes, based on a preset correspondence between the scale ratio between the main storage cluster and the backup storage cluster and an upper limit value of a flow rate, an upper limit value of a flow rate used by data from the main storage cluster to the backup storage cluster is adjusted, so that the upper limit value matches the changed scale ratio. The embodiment of the disclosure can automatically adjust the upper limit of the flow rate of data synchronization based on the scale proportion between the main storage cluster and the backup storage cluster, and meanwhile, can avoid excessive pressure on the backup storage cluster during data synchronization due to the fact that the scales of the backup storage cluster and the main storage cluster are inconsistent.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a diagram illustrating a data synchronization scenario for a distributed database in accordance with an exemplary embodiment;
fig. 2 is a flowchart illustrating a first embodiment of a traffic adjustment method for data synchronization according to an exemplary embodiment;
fig. 3 is a flowchart illustrating a second embodiment of a traffic adjustment method for data synchronization according to an exemplary embodiment;
fig. 4 is a flowchart illustrating a third embodiment of a traffic adjustment method for data synchronization according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating a first embodiment of a data-synchronized traffic shaper in accordance with an illustrative embodiment;
fig. 6 is a block diagram illustrating a terminal device according to an example embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic diagram illustrating a data synchronization scenario of a distributed database according to an exemplary embodiment, in the distributed database provided in fig. 1, a log 10, a primary storage cluster 11, and a backup storage cluster 12 are included, where the primary storage cluster 11 includes a plurality of primary storage media, the backup storage cluster 12 includes a plurality of backup storage media, and the number of primary storage media included in the primary storage cluster 11 may be different from the number of backup storage media included in the backup storage cluster 12. The primary storage cluster 11 is used to retrieve data from the log 10 and synchronize the data to the backup storage cluster 12. In the prior art, the upper limit of the traffic transmitted between the primary storage medium 11 and the backup storage cluster 12 is configured manually, but when the size of the backup storage cluster 12 is enlarged or reduced, the upper limit of the traffic needs to be reconfigured manually. The manual configuration mode is inefficient and labor cost is high.
In view of the above problems in the prior art, an embodiment of the present disclosure provides a data synchronization traffic adjustment scheme, where a scale ratio between a main storage cluster and a backup storage cluster is monitored, and when it is monitored that the scale ratio between the main storage cluster and the backup storage cluster changes, an upper limit value of traffic used for synchronizing data from the main storage cluster to the backup storage cluster is adjusted based on a preset correspondence between the scale ratio between the main storage cluster and the backup storage cluster and a traffic upper limit value, so that the upper limit value matches the changed scale ratio. The embodiment of the disclosure can automatically adjust the upper limit of the flow of data synchronization based on the scale proportion between the main storage cluster and the backup storage cluster, and has the advantages of high adjustment efficiency and labor cost saving compared with the existing manual adjustment mode
Fig. 2 is a flowchart illustrating a first embodiment of a traffic adjustment method for data synchronization, which is applied to a distributed database including a primary storage cluster and a backup storage cluster, where the primary storage cluster is used to obtain data from a storage log of the distributed database and synchronize the data to the backup storage cluster for backup, where the primary storage cluster and the backup storage cluster may each include a plurality of storage media, and the number of the storage media included in each of the primary storage cluster and the backup storage cluster may be different. As shown in fig. 2, the method includes:
in step 101, the scale between the primary storage cluster and the backup storage cluster is monitored.
The sizes of the primary storage clusters and the backup storage clusters referred to in this embodiment refer to the number of storage media included in the primary storage clusters and the backup storage clusters. The scale ratio between the primary storage cluster and the backup storage cluster in this embodiment may be exemplarily understood as a ratio of the number of storage media contained in the primary storage cluster to the number of storage media contained in the backup storage cluster.
In one embodiment, because the factor affecting the data transmission capability between the primary storage cluster and the backup storage cluster is mainly the number of storage media in the backup storage cluster, when the number of storage media in the backup storage cluster is large, the upper limit value of the traffic for data transfer between the primary storage cluster and the backup storage cluster may be set relatively high, whereas when the number of storage media in the backup storage cluster is low, the upper limit value of the traffic for data transfer between the primary and backup storage clusters is set relatively low, the monitoring of the scale between the main storage cluster and the backup storage cluster can be realized mainly by monitoring the scale change (scale up or scale down) of the backup storage cluster in the embodiment, when the size of the backup storage cluster changes, the size ratio between the default primary storage cluster and the backup storage cluster changes.
In another implementation, the sizes of the primary storage cluster and the backup storage cluster may be monitored simultaneously, and when one of the sizes changes or when the sizes of the two changes in unequal proportion, it is determined that the previous size proportion of the two changes.
In step 102, when the scale ratio is changed, based on a preset correspondence between the scale ratio between the primary storage cluster and the backup storage cluster and an upper limit value of the traffic, adjusting an upper limit value of the traffic used for synchronizing the data from the primary storage cluster to the backup storage cluster so that the upper limit value matches the changed scale ratio.
In this embodiment, the correspondence between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow rate may be set as needed, and is not limited to a specific correspondence. For example, in an exemplary embodiment, a corresponding upper limit of traffic may be set for each preset scale ratio, and when the upper limit of traffic between the primary storage cluster and the backup storage cluster is adjusted, the upper limit of traffic between the primary storage cluster and the backup storage cluster may be adjusted to a corresponding value according to the scale ratio between the primary storage cluster and the backup storage cluster. Or, in another embodiment, the size of the backup storage cluster may be taken as a consideration, and for each preset size ratio, a corresponding upper limit value of the traffic may be set in combination with the size of the backup storage cluster, for example, if the size ratio between the main storage cluster and the backup storage cluster is 2 to 1 and the size of the backup storage cluster is 50, the upper limit value of the traffic may be set to be one half of the size of the backup storage cluster under the condition of the size ratio and the size of the backup storage cluster. It is understood that this is by way of illustration only and is not meant as an exclusive limitation of the present disclosure.
In this embodiment, when it is detected that the scale ratio between the main storage cluster and the backup storage cluster changes, based on a preset corresponding relationship between the scale ratio between the main storage cluster and the backup storage cluster and an upper limit value of a flow rate, an upper limit value of a flow rate used by data from the main storage cluster to the backup storage cluster is adjusted, so that the upper limit value matches the changed scale ratio. According to the embodiment, the upper limit of the flow of data synchronization can be automatically adjusted based on the scale proportion between the main storage cluster and the backup storage cluster, and meanwhile, excessive pressure on the backup storage cluster caused by the fact that the scales of the backup storage cluster and the main storage cluster are inconsistent during data synchronization can be avoided.
Further optimization and expansion of the embodiment of fig. 2 are performed below.
Fig. 3 is a flowchart illustrating a second embodiment of a traffic adjustment method for data synchronization according to an exemplary embodiment. As shown in fig. 3, on the basis of the embodiment of fig. 2, the method includes the following steps:
in step 201, the number of storage media in the backup storage cluster whose remaining storage space is greater than a first preset threshold is monitored.
In step 202, if the number of storage media in the backup storage cluster whose remaining storage space is greater than the first preset threshold changes, the scale ratio between the primary storage cluster and the backup storage cluster is defaulted to change, and based on the preset correspondence between the scale ratio between the primary storage cluster and the backup storage cluster and the upper limit value of the flow rate, the upper limit value of the flow rate used by the data from the primary storage cluster to the backup storage cluster is adjusted so that the upper limit value matches the changed scale ratio.
In the scenario of this embodiment, data acquired by the primary storage cluster from the log is synchronized to a storage medium whose remaining storage space in the backup storage cluster is greater than a first preset threshold. Therefore, in this embodiment, the number of storage media in the backup storage cluster, of which the remaining storage space is greater than the first preset threshold, is used as a basis for adjusting the upper limit of the traffic between the primary storage cluster and the backup storage cluster.
In this embodiment, the storage condition of each storage medium is obtained from the backup storage cluster in real time or periodically, the number of storage media whose remaining storage space is greater than the first preset threshold in the backup storage cluster is determined according to the storage condition of each storage medium, and when the number of storage media whose remaining storage space is greater than the first preset threshold in the backup storage cluster increases or decreases, the upper limit of the flow between the main storage cluster and the backup storage cluster is correspondingly adjusted.
For example, in the present embodiment, the scale ratio between the primary storage cluster and the backup storage cluster may be exemplarily understood as follows: the ratio of the number of storage media in the main storage cluster to the number of storage media with the remaining storage space in the backup storage cluster larger than a first preset threshold value.
The method for adjusting the upper limit value of the flow used by the data from the primary storage cluster to the backup storage cluster in the embodiment is similar to that in the embodiment of fig. 2 based on the preset corresponding relationship between the scale ratio between the primary storage cluster and the backup storage cluster and the upper limit value of the flow, and is not described here again.
In this embodiment, the number of storage media whose remaining storage space is greater than the first preset threshold in the backup storage cluster is monitored, and when the number of storage media whose remaining storage space is greater than the first preset threshold in the backup storage cluster changes, the upper limit of the flow between the main storage cluster and the backup storage cluster is adjusted, so that data transmitted by the main storage cluster is stored in the storage media whose remaining storage space is greater than the first preset threshold in the backup storage cluster, thereby achieving automatic flow adjustment and reducing the pressure on the storage media whose remaining space is smaller in the backup storage cluster.
Fig. 4 is a flowchart illustrating a third embodiment of a traffic adjustment method for data synchronization according to an exemplary embodiment. As shown in fig. 4, on the basis of the embodiment of fig. 2, the method includes the following steps:
in step 301, the number of storage media in the backup storage cluster whose processing resource occupancy rate is lower than a second preset threshold is monitored.
In step 302, if the number of storage media in the backup storage cluster whose processing resource occupancy rate is lower than a second preset threshold value changes, it is default that the scale ratio between the main storage cluster and the backup storage cluster changes, and based on a preset corresponding relationship between the scale ratio between the main storage cluster and the backup storage cluster and an upper limit value of traffic, an upper limit value of traffic used by the data from the main storage cluster to the backup storage cluster is adjusted so that the upper limit value matches the changed scale ratio.
In the scenario provided by this embodiment, data acquired by the main storage cluster from the log is transmitted to a storage medium in the backup storage cluster, where the processing resource occupancy rate is lower than a second preset threshold, for backup storage.
In this embodiment, the occupation situation of the processing resources of each storage medium is obtained from the backup storage cluster in real time or periodically, and according to the occupation situation of the processing resources of each storage medium, it is determined which storage media are relatively idle and which storage media are relatively busy, and when the number of the storage media (i.e., the relatively idle storage media) having the processing resource occupation rate lower than the second preset threshold included in the backup storage cluster increases or decreases, the upper limit of the traffic between the main storage cluster and the backup storage cluster is adjusted accordingly.
For example, in the present embodiment, the scale ratio between the primary storage cluster and the backup storage cluster may be exemplarily understood as follows: the ratio of the number of the storage media in the main storage cluster to the number of the storage media in the backup storage cluster, the occupancy rate of the processing resources of which is lower than a second preset threshold value.
The method for adjusting the upper limit value of the flow used by the data from the primary storage cluster to the backup storage cluster in the embodiment is similar to that in the embodiment of fig. 2 based on the preset corresponding relationship between the scale ratio between the primary storage cluster and the backup storage cluster and the upper limit value of the flow, and is not described here again.
In this embodiment, the number of storage media with the processing resource occupancy rate lower than the second preset threshold in the backup storage cluster is monitored, and when the number of storage media with the processing resource occupancy rate lower than the second preset threshold in the backup storage cluster changes, the upper limit of the flow between the main storage cluster and the backup storage cluster is adjusted, so that data transmitted by the main storage cluster is stored in a storage medium that is relatively idle in the backup storage cluster, thereby improving the processing rate of the data in the backup storage cluster while achieving automatic flow adjustment.
Fig. 5 is a block diagram illustrating a first embodiment of a traffic conditioner for data synchronization, according to an exemplary embodiment, where the traffic conditioner 50 is applied to a distributed database, the distributed database further includes a primary storage cluster and a backup storage cluster, the primary storage cluster is configured to obtain data from a storage log of the distributed database, and synchronize the data to the backup storage cluster for backup, and as shown in fig. 5, the traffic conditioner 50 includes:
a cluster size monitoring module 51 configured to monitor a scale ratio between the primary storage cluster and the backup storage cluster;
and a traffic adjusting module 52 configured to, when the scale changes, adjust an upper limit value of traffic used for synchronizing the data from the primary storage cluster to the backup storage cluster based on a preset correspondence between the scale and an upper limit value of the traffic between the primary storage cluster and the backup storage cluster, so that the upper limit value matches the changed scale.
Optionally, the cluster size monitoring module 51 includes:
a first monitoring submodule configured to monitor whether the backup storage cluster is scaled up or down.
Optionally, the cluster size monitoring module 51 includes:
and the second monitoring submodule is configured to monitor the number of the storage media with the remaining storage space larger than a first preset threshold value in the backup storage cluster.
Optionally, the cluster size monitoring module 51 includes:
and the third monitoring submodule is configured to monitor the number of the storage media in the backup storage cluster, wherein the processing resource occupancy rate of the storage media is lower than a second preset threshold value.
The apparatus provided in this embodiment can execute the method shown in any one of fig. 2 to fig. 4, and the execution manner and the beneficial effects are similar, which are not described herein again.
With regard to the flow rate adjusting device in the above embodiment, the specific manner in which each module and sub-module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
Having described the internal functions and structure of the flow rate adjustment device, in practice, the flow rate adjustment device may be implemented as a computer device such as a mobile phone, including:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to:
monitoring a scale ratio between the primary storage cluster and the backup storage cluster;
when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio.
Fig. 6 is a block diagram illustrating a terminal device according to an example embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 6, terminal device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 808 comprises a screen providing an output interface between the terminal device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
In an exemplary embodiment, the terminal device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a data synchronized traffic adjustment method, the method comprising:
monitoring a scale ratio between the primary storage cluster and the backup storage cluster;
when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A flow regulation method for data synchronization is applied to a distributed database, and the distributed database comprises the following steps: the method comprises the following steps that a main storage cluster and a backup storage cluster are used, wherein the main storage cluster is used for acquiring data from a storage log of the distributed database and synchronizing the data to the backup storage cluster for backup, and the method is characterized by comprising the following steps:
monitoring a scale ratio between the primary storage cluster and the backup storage cluster, wherein the scale of the primary storage cluster and the backup storage cluster refers to the number of storage media included in the primary storage cluster and the backup storage cluster;
when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster is adjusted so as to match the upper limit value with the changed scale ratio.
2. The method of claim 1, wherein the monitoring a scale between the primary storage cluster and the backup storage cluster comprises:
monitoring whether the backup storage cluster is scaled up or down.
3. The method of claim 1, wherein the monitoring a scale between the primary storage cluster and the backup storage cluster comprises:
and monitoring the number of the storage media with the residual storage space larger than a first preset threshold value in the backup storage cluster.
4. The method of claim 1, wherein the monitoring a scale between the primary storage cluster and the backup storage cluster comprises:
and monitoring the number of the storage media with the processing resource occupancy rate lower than a second preset threshold value in the backup storage cluster.
5. A data synchronization traffic adjusting apparatus, which is applied to a distributed database, the distributed database further comprising: a primary storage cluster and a backup storage cluster, the primary storage cluster configured to obtain data from a storage log of the distributed database and synchronize the data to the backup storage cluster for backup, the apparatus comprising:
a cluster size monitoring module configured to monitor a scale ratio between the primary storage cluster and the backup storage cluster, wherein the scales of the primary storage cluster and the backup storage cluster refer to the number of storage media included in the primary storage cluster and the backup storage cluster;
and the flow adjusting module is configured to adjust the upper limit value of the flow used by the data to synchronize from the main storage cluster to the backup storage cluster based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow when the scale ratio is changed, so that the upper limit value is matched with the changed scale ratio.
6. The apparatus of claim 5, wherein the cluster size monitoring module comprises:
a first monitoring submodule configured to monitor whether the backup storage cluster is scaled up or down.
7. The apparatus of claim 5, wherein the cluster size monitoring module comprises:
and the second monitoring submodule is configured to monitor the number of the storage media with the remaining storage space larger than a first preset threshold value in the backup storage cluster.
8. The apparatus of claim 5, wherein the cluster size monitoring module comprises:
and the third monitoring submodule is configured to monitor the number of the storage media in the backup storage cluster, wherein the processing resource occupancy rate of the storage media is lower than a second preset threshold value.
9. A computer device, comprising:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to:
monitoring a scale ratio between a main storage cluster and a backup storage cluster, wherein the scale of the main storage cluster and the backup storage cluster refers to the number of storage media included in the main storage cluster and the backup storage cluster;
when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, adjusting the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster so as to enable the upper limit value to be matched with the changed scale ratio.
10. A computer-readable storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform a method comprising:
monitoring a scale ratio between a main storage cluster and a backup storage cluster, wherein the scale of the main storage cluster and the backup storage cluster refers to the number of storage media included in the main storage cluster and the backup storage cluster;
when the scale ratio is changed, based on the preset corresponding relation between the scale ratio between the main storage cluster and the backup storage cluster and the upper limit value of the flow, adjusting the upper limit value of the flow used by the data from the main storage cluster to the backup storage cluster so as to enable the upper limit value to be matched with the changed scale ratio.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910541359.2A CN110263099B (en) | 2019-06-21 | 2019-06-21 | Data synchronization flow adjustment method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910541359.2A CN110263099B (en) | 2019-06-21 | 2019-06-21 | Data synchronization flow adjustment method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110263099A CN110263099A (en) | 2019-09-20 |
CN110263099B true CN110263099B (en) | 2021-07-13 |
Family
ID=67920221
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910541359.2A Active CN110263099B (en) | 2019-06-21 | 2019-06-21 | Data synchronization flow adjustment method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110263099B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750283A (en) * | 2011-04-20 | 2012-10-24 | 阿里巴巴集团控股有限公司 | Massive data synchronization system and method |
CN103186536A (en) * | 2011-12-27 | 2013-07-03 | 中兴通讯股份有限公司 | Method and system for scheduling data shearing devices |
CN106357764A (en) * | 2016-09-14 | 2017-01-25 | 广东欧珀移动通信有限公司 | Data synchronization method and sever of mobile terminal |
CN106570074A (en) * | 2016-10-14 | 2017-04-19 | 深圳前海微众银行股份有限公司 | Distributed database system and implementation method thereof |
CN107015972A (en) * | 2016-01-27 | 2017-08-04 | 五八同城信息技术有限公司 | A kind of computer room business migration methods, devices and systems |
CN107809362A (en) * | 2017-11-15 | 2018-03-16 | 深圳四方精创资讯股份有限公司 | The collocation method and its system of ESB |
CN108259221A (en) * | 2017-12-04 | 2018-07-06 | 山石网科通信技术有限公司 | Flow control methods, device, system, storage medium and processor |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108319618B (en) * | 2017-01-17 | 2022-05-06 | 阿里巴巴集团控股有限公司 | Data distribution control method, system and device of distributed storage system |
US10565231B2 (en) * | 2017-06-15 | 2020-02-18 | International Business Machines Corporation | Performance adjuster for web application server and relational database system |
-
2019
- 2019-06-21 CN CN201910541359.2A patent/CN110263099B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750283A (en) * | 2011-04-20 | 2012-10-24 | 阿里巴巴集团控股有限公司 | Massive data synchronization system and method |
CN103186536A (en) * | 2011-12-27 | 2013-07-03 | 中兴通讯股份有限公司 | Method and system for scheduling data shearing devices |
CN107015972A (en) * | 2016-01-27 | 2017-08-04 | 五八同城信息技术有限公司 | A kind of computer room business migration methods, devices and systems |
CN106357764A (en) * | 2016-09-14 | 2017-01-25 | 广东欧珀移动通信有限公司 | Data synchronization method and sever of mobile terminal |
CN106570074A (en) * | 2016-10-14 | 2017-04-19 | 深圳前海微众银行股份有限公司 | Distributed database system and implementation method thereof |
CN107809362A (en) * | 2017-11-15 | 2018-03-16 | 深圳四方精创资讯股份有限公司 | The collocation method and its system of ESB |
CN108259221A (en) * | 2017-12-04 | 2018-07-06 | 山石网科通信技术有限公司 | Flow control methods, device, system, storage medium and processor |
Also Published As
Publication number | Publication date |
---|---|
CN110263099A (en) | 2019-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109076558B (en) | Method and device for identifying downlink transmission | |
US20170055221A1 (en) | Method and apparatus for starting energy saving mode | |
CN107040591B (en) | Method and device for controlling client | |
CN106775235B (en) | Screen wallpaper display method and device | |
CN109863813B (en) | Random access method and device | |
US20210314996A1 (en) | Method and apparatus for configuring and determining transmission block scheduling interval, and base station | |
CN113596175A (en) | Scene synchronization method, terminal, server and system | |
CN105657690A (en) | Method and device for processing mobile terminal setting information | |
CN109522058B (en) | Wake-up method, device, terminal and storage medium | |
US11856538B2 (en) | Method and apparatus for broadcasting configuration information of synchronizing signal block, and method and apparatus for receiving configuration information of synchronizing signal block | |
CN109565381B (en) | Information feedback method and device | |
CN111601377B (en) | Temperature control method, device and storage medium | |
CN107222576B (en) | Photo album synchronization method and device | |
CN105376318A (en) | File transmission method, device and system | |
CN104112460B (en) | Method and device for playing audio data | |
US11089537B2 (en) | Method and device for broadcasting system information for supporting network communication of terminal | |
US11812386B2 (en) | Configuration adjustment methods, apparatuses, electronic device and computer readable storage medium | |
CN110263099B (en) | Data synchronization flow adjustment method, device, equipment and storage medium | |
CN114430370B (en) | Method, device, equipment and storage medium for determining network slice | |
CN110704197B (en) | Method, apparatus and medium for processing memory access overhead | |
US11076367B2 (en) | Power headroom report transmission method and apparatus | |
CN109981729B (en) | File processing method and device, electronic equipment and computer readable storage medium | |
CN108427582B (en) | Method and device for determining stuck state and computer readable storage medium | |
CN110784721A (en) | Picture data compression method and device, electronic equipment and storage medium | |
CN106170038B (en) | Recording method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |