Multi-region Database Replication with Dynamic Master Routing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing distributed data storage services face challenges in scaling while maintaining data consistency across geographical regions, as they often rely on asynchronous replication, leading to eventual consistency issues that can impact performance and availability.
Innovation Solution
A hybrid, multi-master design for geographically distributed systems that allows for both reads and writes to be performed locally in each region, with a single region serving as a master for strong consistency and other regions providing eventual consistency, enabling flexible routing of requests based on consistency types and workload characteristics.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If asynchronous replication is used across geographical regions, then scalability and availability are improved, but data consistency deteriorates
Solution Approach 1:
The patent segments the database system into multiple master nodes distributed across different geographical regions, each capable of handling reads and writes independently. This segmentation allows the system to scale horizontally while maintaining the ability to provide strong consistency within each region through local master coordination.
Solution Approach 2:
The patent implements local quality by allowing each regional master to provide strong consistency guarantees for its local region while asynchronous replication propagates changes to other regions. This means different parts of the system can have different consistency characteristics optimized for their specific operational needs.
2Manufacturing precision
If a single master architecture is used, then data consistency is improved, but scalability and performance deteriorate
Solution Approach 1:
The patent divides the single master architecture into multiple master nodes, each responsible for a specific geographical region. This segmentation allows parallel processing of write operations across different regions, significantly improving throughput and scalability while maintaining consistency through coordinated replication.
Solution Approach 2:
The patent introduces a new dimension to the master-slave architecture by allowing multiple nodes to serve as masters simultaneously in different geographical contexts. This multi-master approach adds a spatial dimension to consistency management, enabling parallel writes without sacrificing consistency.
3Manufacturing precision
If strong consistency is enforced across all regions, then data consistency is improved, but availability and scalability deteriorate
Solution Approach 1:
The patent applies local quality by providing strong consistency guarantees within each regional master's service area while allowing asynchronous replication to other regions. This enables the system to maintain high availability and scalability by not requiring all regions to be synchronized for every operation, while still ensuring consistency where needed.
Solution Approach 2:
The patent implements dynamic consistency management where the system can adapt consistency requirements based on operational context. The multi-master architecture allows dynamic routing of requests to appropriate regions and enables flexible consistency guarantees that adjust to workload characteristics and regional priorities.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A geographically distributed system using a hybrid, multi-master design is disclosed. The system may use global tables, for which both reads and writes may be performed locally, but with a single region serving as a master region. All strongly consistent reads and writes may be sent to the master region, whereas eventually consistent reads and writes may be performed in any region with a replica. The master region may not be statically assigned but may move from region to region. The master region may be assigned manually by client preference or may be assigned and updated automatically based on the time of day or workload characteristics.