Database Replication via Asynchronous Precommit Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database replication methods face challenges in maintaining consistency and efficiency, particularly with synchronous replication protocols that delay transaction visibility and add complexity, while asynchronous replication may lead to outdated data and increased complexity.
Innovation Solution
The proposed solution involves asynchronous replication with synchronous communications for precommitting transactions, allowing the source node to commit transactions without waiting for acknowledgement from the replica node, and using write logs to efficiently replicate database operations across multiple nodes, thereby reducing replication overhead and improving response times.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If synchronous replication protocol is used to maintain consistency between source and replica tables, then data consistency is improved, but system performance deteriorates due to multiple communications between source and replica hosts within the same transaction boundary
Solution Approach 1:
The patent segments the replication process into two distinct phases: an asynchronous phase where database operations are replicated to the replica table without blocking, and a synchronous precommit phase where only a confirmation message is exchanged. This segmentation allows the bulk of replication traffic to occur outside the transaction boundary, reducing the number of communications that impact transaction performance while still ensuring data consistency through the precommit confirmation.
Solution Approach 2:
The patent performs the database operation replication in advance, before the transaction commit is finalized. By asynchronously replicating the operation to the replica table during the transaction execution phase rather than waiting until commit time, the system ensures that the replica is prepared in advance, reducing the communication overhead during the critical commit phase.
2Productivity
If asynchronous replication is used to improve system performance, then transaction visibility is improved, but data consistency deteriorates and system complexity increases
Solution Approach 1:
The patent introduces a feedback mechanism where the replica host sends a confirmation message back to the source host after successfully receiving and executing the database operation. This feedback loop ensures that the source host can verify the replica has been updated before committing the transaction, maintaining data consistency while still allowing asynchronous replication to improve overall system performance.
3Reliability
If synchronous replication is used within the same transaction boundary, then data consistency is improved, but transaction visibility deteriorates due to delayed visibility at both source and replica hosts
Solution Approach 1:
The patent performs the database operation replication in advance, before the transaction commit is finalized. By asynchronously replicating the operation to the replica table during the transaction execution phase rather than waiting until commit time, the system ensures that the replica is prepared in advance, reducing the communication overhead during the critical commit phase and enabling earlier transaction visibility.
4Productivity
If fully asynchronous replication is used to improve system performance, then replication overhead is reduced, but system complexity increases
Solution Approach 1:
The patent segments the replication protocol into a simple asynchronous operation phase and a minimal synchronous confirmation phase. This segmentation allows the system to use lightweight asynchronous messaging for the bulk of replication traffic, reducing protocol complexity compared to fully synchronous approaches, while still incorporating necessary consistency checks through the precommit confirmation exchange.
Data Source
AI summary
Technologies are described for performing replication of data within a database environment having a source node and a replica node. The source node executes a database operation on at least one database table stored by the source node. The source node asynchronously sends the database operation to the replica node. A prepare commit request is synchronously sent from the source node to the replica node. The source node receives a synchronous precommit acknowledgement from the replica node. The precommit acknowledgement indicates that the database operation was executed at the replica node. The source node commits a transaction associated with the database operation.


