Database Migration Gateway for Low-Downtime Service Cutover
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional database migration schemes cause disruptions and require extensive reconnection times due to the termination of connections with both source and target databases, leading to user frustration and resource consumption.
Innovation Solution
A gateway client maintains connections to both the source and target databases during migration, managing read and write operations to minimize disruptions and conserve resources by pausing operations temporarily and reversing roles without immediate shutdown.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If connections to both source and target databases are terminated during migration, then data can be fully migrated from source to target, but service disruptions occur and reconnection time increases
Solution Approach 1:
The patent establishes read-only connections to the target database before the migration process begins. This preliminary action ensures that when migration starts, the connections are already in place and can immediately begin serving read operations, eliminating the need for reconnection after migration and thus reducing service downtime while ensuring complete data migration.
Solution Approach 2:
The patent introduces a connection pool manager as an intermediary that manages multiple database connections. This mediator maintains connections to both source and target databases simultaneously, allowing seamless switching between them during migration without terminating connections, thereby preventing service disruptions and reducing reconnection time.
2Loss of time
If connections are maintained with both source and target databases during migration, then service disruptions are reduced, but resource consumption increases
Solution Approach 1:
The patent implements a dynamic connection management system where the connection pool manager actively monitors and adjusts the state of database connections during migration. Connections can be dynamically opened, closed, or switched based on the migration phase and current workload, optimizing resource consumption while maintaining service availability. This dynamic approach ensures connections are maintained only when necessary rather than permanently open.
Solution Approach 2:
The patent changes the operational parameters of database connections by implementing different connection states (active, standby, read-only, closed) and transitioning between them based on migration needs. This parameter-based management allows the system to maintain connections in lower-resource states when full functionality is not required, reducing overall resource consumption while preventing complete connection termination that would cause service disruptions.
3Manufacturing precision
If read and write operations are paused during data replication, then data consistency is maintained, but operational functionality is disrupted
Solution Approach 1:
The patent segments database operations into distinct categories: read operations, write operations, and migration operations. By segmenting these operations, the system can allow read operations to continue serving applications while write operations are temporarily paused during critical migration phases. This segmentation maintains data consistency for written data while preserving service functionality for read operations, reducing overall disruption.
Solution Approach 2:
The patent implements periodic pausing and resuming of write operations during the migration process. Instead of continuously blocking all operations, the system periodically pauses write operations only when data replication requires consistency, then resumes them when safe. This periodic action maintains data consistency during critical replication moments while preserving service functionality during safe windows, minimizing overall operational disruption.
Data Source
AI summary
A source database and a target database are accessed. The source database contains data to be migrated over to the target database. The read operations from the target database and the write operations to the target database are ceased, while the read operations from the source database and the write operations to the source database are maintained. The data from the source database is replicated to the target database. During the replication, the read operations from the source database are maintained but the write operations to the source database are ceased, while the read operations from the target database and the write operations to the target database are also ceased. After the replication has been completed, the read operations from the source database and the write operations to the source database are ceased. The read operations from the target database and the write operations to the target database are resumed.


