Real-time Notification Cache Update for Data Synchronization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multi-active data center systems, the synchronization of data between geographically distant data centers is inefficient, leading to significant delays and impacting user experience due to serial synchronization processes and the inability of application servers to immediately update local caches upon data modifications.
Innovation Solution
Implementing a real-time notification system where the data synchronization source end sends immediate notifications to the target end, allowing for direct cache updates based on the notification, thereby reducing synchronization delays by enabling cache updates before the underlying database synchronization is complete.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If real-time notification is sent and cache is updated directly before database synchronization completes, then cache synchronization speed is improved, but data consistency reliability may deteriorate
Solution Approach 1:
The system sends a real-time notification to the target end as soon as the source end detects data modification, enabling the target end to update its cache proactively before the underlying database synchronization completes. This preliminary action reduces cache synchronization delay from seconds to milliseconds while maintaining data consistency through subsequent database-level synchronization guarantees.
2Reliability
If traditional serial synchronization process is used, then data consistency is maintained, but synchronization time increases
Solution Approach 1:
The patent implements preliminary cache update action by notifying the target end in real-time when source data is modified. The target end updates its cache immediately upon receiving the notification, before the underlying database synchronization completes. This breaks the traditional serial synchronization process and reduces synchronization delay significantly.
3Reliability
If standby data center is used for disaster recovery, then system reliability is improved, but resource utilization deteriorates
Solution Approach 1:
The patent implements multi-active data center architecture where each data center can independently provide services and handle requests. The synchronization apparatus enables each data center to function as both primary and backup simultaneously, allowing standby data centers to be reused for normal service provision, thus improving resource utilization while maintaining disaster recovery capability.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present application discloses a data synchronization method, apparatus, and system. The data synchronization method includes the following: after determining that data of a source end database is modified, generating a real-time notification for this data modification by a data synchronization source end and sending the real-time notification to a data synchronization target end; and after receiving the real-time notification, obtaining data modification related information by parsing the real-time notification by the data synchronization target end and updating a cache in a target end database based on a parsing result. In the previous solution, after the real-time notification is received, a cache in a local database can be directly updated based on information included in the real-time notification. Nonetheless, monitoring a local database can be initiated to update cache data immediately after synchronization of local data is completed so as to reduce a cache synchronization update delay.