Database Upgrade via Primary-Secondary Site Switching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Upgrading large databases in online systems, such as multi-tenant systems, often results in significant downtime, which is unacceptable for applications that handle a large number of transactions per second, as conventional techniques require the database to be unavailable for several hours or days during the upgrade process.

Innovation Solution

The system reduces downtime by redirecting client requests from a primary database to a secondary standby database, allowing for the upgrade of the primary database while maintaining availability, by using a combination of logical and physical replication to synchronize data across databases and switch processing responsibilities between sites.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the database is upgraded using conventional techniques, then the database version is updated to support new features and security fixes, but the database becomes unavailable for several hours or days causing significant downtime

Engineering Contradiction:
Improvedatabase availabilityVSAvoiddowntime during upgrade
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The database system is segmented into multiple independent database instances (first database instance, second database instance, third database instance) that can operate independently. This allows the upgrade process to be divided into separate phases where different instances are upgraded at different times, ensuring continuous availability of at least one instance throughout the upgrade process.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A fourth database instance is prepared in advance with the latest database version before the upgrade process begins. This pre-prepared instance serves as a ready-to-switch backup that can immediately take over if issues arise during the upgrade of active instances, minimizing potential downtime and ensuring business continuity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 3:

The system introduces intermediary components including a replication manager that coordinates data synchronization between instances and a switch manager that handles the redirection of client requests. These intermediaries enable seamless transitions between database instances during upgrades, maintaining availability without requiring direct manual intervention.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If the database remains available during upgrade by using standby databases, then availability is maintained, but the system complexity increases with multiple database instances and replication mechanisms

Engineering Contradiction:
Improvedatabase availabilityVSAvoidsystem architecture complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The replication manager implements self-service automation by automatically detecting which database instances require upgrading, coordinating the upgrade sequence, and managing data replication between instances without requiring manual intervention. This automation reduces the operational complexity of managing multiple database instances despite the increased architectural complexity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The switch manager monitors the health and status of database instances continuously and provides feedback to automatically determine when to switch between instances. This feedback mechanism enables the system to self-regulate and maintain availability dynamically without complex manual control, offsetting the architectural complexity through intelligent automation.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12050618B2Upgrading replicated databases with small downtime
Publication Date: 2024.07.30 SALESFORCE INC
  • US12050618B2 patent drawing
  • US12050618B2 patent drawing
  • US12050618B2 patent drawing

AI summary

An online system performs upgrades of replicated databases. The online system stores data in a primary site and a secondary site. The primary site comprising databases used to process client requests and a secondary site comprising databases used as standby. The online system upgrades databases of both sites by upgrading the secondary site, switching client requests to the secondary site while using the databases of primary site as standby databases. The online system then upgrades the primary site. The process allows the online system to upgrade databases with small down time.