Data synchronization method, device, terminal and storage medium
A data synchronization and database technology, applied in the direction of structured data retrieval, database distribution/replication, special data processing applications, etc., can solve problems such as database downtime, affecting user experience, etc., and achieve the effect of smooth and fast transmission
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0045] figure 1 It is a flow chart of a data synchronization method provided by Embodiment 1 of the present disclosure. This embodiment is especially applicable to the situation where two independent databases perform data intercommunication, and can be used to realize multi-active in different places. This method can be executed by a data synchronization device , the data synchronization device may be configured in a terminal or a server to implement the data synchronization method of the embodiment of the present disclosure. Wherein, whether the two databases are in different places may be determined according to a round-trip time delay (Round-TripTime, RTT) between the two databases. That is, according to the total time delay experienced from the time when the sender sends data to when the sender receives the confirmation from the receiver, generally the receiver sends an acknowledgment immediately after receiving the data.
[0046] Such as figure 1 As shown, the method i...
Embodiment 2
[0062] figure 2 It is a schematic flowchart of a data synchronization method provided in Embodiment 2 of the present disclosure. This embodiment is further optimized on the basis of each optional solution in the foregoing embodiments. In this embodiment, optionally, the synchronizing the second data to be synchronized from the first slave database to the second master database includes: The log file Binlog determines the incremental data of the first slave database; and synchronizes the incremental data to the second master database through the distributed publish-subscribe message system kafka message queue.
[0063] Such as figure 2 As shown, the method in this embodiment may specifically include:
[0064] S210. Control the first master database to transmit the data to be synchronized in the first master database to the first slave database of the first master database.
[0065] S220. Determine the incremental data of the first slave database according to the log file B...
Embodiment 3
[0073] image 3 It is a schematic flow diagram of a data synchronization method provided by Embodiment 3 of the present disclosure. This embodiment is especially suitable for data intercommunication between two independent databases, and can be used to realize multi-active in different places. This method can be executed by a data synchronization device , the device may be configured in a terminal or a server to execute the data synchronization method of this embodiment.
[0074] Such as image 3 As shown, the method of this embodiment may specifically include:
[0075] S310. Receive the data to be synchronized transmitted by the first slave database of the first master database through the second master database.
[0076] Wherein, the data to be synchronized comes from the first master database. as mentioned earlier. Wherein, the data to be synchronized includes historical data of the first database and incremental data of the first database. It can be understood that th...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


