Zero Downtime Database Upgrade via View-Layer Replication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing maintenance procedures for applications and databases often result in downtime during upgrades, especially in systems with database-side replication, due to replication hindering the upgrade process and causing inconsistent data sets, which can lead to significant resource consumption and prolonged downtime.
Innovation Solution
Implementing a blue-green deployment approach with clone data components and access schemas, where the upgrade is performed on a view-layer rather than the table layer, allowing for zero-downtime upgrades by replicating data on the view-layer and switching to the target version after completion, thereby shielding modifications from the application and reducing resource consumption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional maintenance procedures are used to upgrade applications and databases, then the upgrade can be completed, but downtime occurs and users are unable to interact with the application
Solution Approach 1:
The patent segments the database schema into multiple versions (old schema and new schema) that can coexist. The replication system is also segmented into multiple handlers (old handler and new handler) that can operate independently. This allows the application to continue using the old schema while the new schema is being prepared and tested, eliminating downtime during schema upgrades.
Solution Approach 2:
The patent performs preliminary actions by creating the new schema and new replication handler in advance before switching them into use. The new schema is defined and populated with data through replication from the old schema before the application needs to use it. This preliminary preparation ensures that when the switch occurs, there is no downtime as the new components are already ready.
2Ease of manufacture
If data is copied to separate databases for maintenance procedures, then the maintenance can be performed, but additional computing resources and memory are required
Solution Approach 1:
The patent uses database-side replication to create copies of data components in the new schema rather than copying entire databases to separate systems. The replication system automatically copies and transforms data from the old schema to the new schema, reducing the manual effort and resources required for maintenance procedures while enabling seamless upgrades.
3Reliability
If replication is performed during upgrade, then data consistency can be maintained, but the replication process hinders the upgrade and causes inconsistent data sets
Solution Approach 1:
The patent introduces an intermediary layer in the form of schema versioning and handler routing. The replication system uses version identifiers to determine which schema and handler to use for replication operations. This intermediary mechanism allows multiple versions to coexist without conflict, maintaining data consistency while enabling smooth transitions during upgrades without hindering the process.
Data Source
AI summary
Implementations include providing, by a deploy tool, clone data components in the first database system, each clone data component being a copy of a data component, defining, by the deploy tool, a source-side green access schema in the first database system, the green access schema providing views to the clone data components, providing, by a replication system and based on statements received from the deploy tool, consumer-side clone data components in the first database system, each consumer-side clone data component being a copy of a respective data component, defining, by a replication system and based on statements received from the deploy tool, a consumer-side green access schema in the first database system, the green access schema providing views to the source-side clone data components, and, during execution of the upgrade, replicating, by a handler of the replication system, data from at least one source-side data component to a consumer-side component.


