Differential Log Synchronization for Network-Resilient Database Replication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The semi-synchronous log replication mode in database systems is prone to data inconsistency and loss due to network jitter or stress, affecting stability and reliability.
Innovation Solution
A log synchronization method where the active node stores logs in a storage system, generating and sending differential logs to the standby node, thereby avoiding direct replication and reducing network dependency, with relay logs stored in the storage system or standby node to enhance reliability and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If semi-synchronous log replication mode is used, then data consistency between active node and standby node can be maintained, but network dependency increases and system reliability decreases under network jitter or stress
Solution Approach 1:
The patent introduces a storage system as an intermediary component that receives logs from the active node and provides them to the standby node. This mediator decouples the direct network dependency between active and standby nodes, allowing log synchronization to proceed through the storage system even when direct network communication experiences jitter or stress, thereby maintaining data consistency while reducing harmful network effects
Solution Approach 2:
The patent segments the log replication function into separate components: the active node generates logs, the storage system stores and manages log files, and the standby node retrieves logs from storage. This segmentation allows each component to operate independently, reducing the impact of network issues on the entire replication process and improving system reliability
2Speed
If active node replicates logs to standby node directly, then synchronization speed may be fast, but system complexity increases and disaster recovery capability decreases
Solution Approach 1:
By introducing the storage system as a central intermediary that manages log storage and distribution, the patent simplifies the overall system architecture. The active node only needs to write logs to the storage system, and the standby node only needs to retrieve them, eliminating the need for complex direct replication protocols and improving disaster recovery capability through centralized log management
3Productivity
If asynchronous log replication mode is used to handle network issues, then system availability is improved, but data consistency and reliability deteriorate
Solution Approach 1:
The patent implements preliminary action by having the active node pre-write logs to the storage system before the standby node needs them. This ensures logs are already available in the storage system and can be immediately retrieved by the standby node without requiring real-time network communication, thus maintaining both high availability and data consistency
Solution Approach 2:
The patent implements a feedback mechanism where the standby node monitors log synchronization status and sends requests to the storage system when logs are needed. The storage system responds by providing the required logs, creating a feedback loop that ensures data consistency while allowing the system to operate asynchronously and maintain high availability
Data Source
AI summary
A storage system and method for storing a log of an active node. The method storing, by a storage system that is of a database system and that has an active node, where the database system comprises an active node, a log of the active node, where the log indicates an operation performed by the active node, receiving, by the storage system, a log synchronization request from a standby node, generating a differential log based on the log synchronization request and the log, and sending the differential log to the standby node, where the differential log indicates an operation not performed by the standby node.


