Multi-Tenant Patch Verification via Shadow Database Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for managing and distributing patches in multi-tenant applications face challenges such as data consistency issues, loss of transactions and sessions during patching, and N-1 data compatibility problems, particularly in cloud environments where multiple versions of applications are executed simultaneously.

Innovation Solution

The solution involves using sidecars and a patch scheduler to apply patches to software in containers, with a shadow database engine writing operational logs to cache storage while the original engine writes to persistent storage, allowing for verification of patch correctness by comparing results from upgraded and non-upgraded containers, and enabling a rolling update with a rollback mechanism.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If patches are applied to software instances in a multi-tenant application, then the software functionality is improved or bugs are fixed, but data consistency issues occur and transactions may be lost

Engineering Contradiction:
Improvepatch correctnessVSAvoiddata consistency
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent segments the database into a shadow database and a production database, allowing independent operations. The shadow database receives replicated data from production, enabling patch verification without affecting live transactions. This segmentation resolves the contradiction by isolating patch testing from production data, preventing data consistency issues while maintaining patch reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a copy of the production database in the shadow database to replicate data for verification purposes. This copy allows patch applications to be tested against replicated data without impacting the actual production data, ensuring data consistency is maintained while enabling reliable patch verification.

Inventive Principle:
Principle #26Copying

2Reliability

If patches are deployed to fix security vulnerabilities and bugs, then system security is improved, but the complexity of managing multiple software versions increases

Engineering Contradiction:
ImprovesecurityVSAvoidversion management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies patches to the shadow database instance before deploying to production. This preliminary action allows security vulnerabilities and bugs to be fixed and verified in advance, then the same patch is rolled out to production without needing to manage multiple versions simultaneously, reducing version management complexity while improving security.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a feedback mechanism where the shadow database verifies patch correctness by comparing results against expected outcomes before production deployment. This feedback loop ensures security patches are validated, eliminating the need to maintain multiple versions for different security levels and simplifying version management while improving system security.

Inventive Principle:
Principle #23Feedback

3Productivity

If traditional patching methods are used in cloud environments, then patches can be applied to containers, but transactions and sessions are lost during the patching process

Engineering Contradiction:
Improvepatch deployment speedVSAvoidtransactions and sessions
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent segments the application into shadow and production instances, allowing patch deployment to the shadow instance while production continues to serve transactions and sessions. This segmentation enables fast patch deployment to the shadow database without interrupting active transactions, maintaining both productivity and data integrity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The shadow database acts as an intermediary between patch deployment and production usage. Patches are first applied and verified in the shadow database, then safely promoted to production without directly impacting ongoing transactions and sessions, thus preventing data loss while enabling rapid patch deployment.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Measurement precision

If multiple versions of application code are executed simultaneously in cloud environments, then patch verification can be performed, but N-1 data compatibility problems arise

Engineering Contradiction:
Improvepatch verification accuracyVSAvoiddata compatibility
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The patent performs patch verification in advance on the shadow database before production deployment. By verifying patches preliminarily in a controlled environment with replicated data, the system ensures data compatibility is validated beforehand, eliminating N-1 data compatibility problems while maintaining verification accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent copies production data to the shadow database, creating an identical replica for verification purposes. This copy allows multiple version compatibility to be tested against the same data structure, ensuring data compatibility is maintained across versions while enabling accurate patch verification without introducing compatibility issues.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11645066B2Managing and distributing patches for multi-tenant applications
Publication Date: 2023.05.09 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11645066B2 patent drawing
  • US11645066B2 patent drawing
  • US11645066B2 patent drawing

AI summary

Aspects include applying a patch to a first instance of software code and verifying that the first instance of the software code with the patch applied is operating as expected. The verifying includes sending a request to the first instance of the software code and sending the request to a second instance of the software code where the patch was previously applied. The verifying also includes comparing a first result received from the first instance of the software code in response to the request and a second result received from the second instance of the software code in response to the request. The verifying further includes determining that the first instance of the software code with the patch applied is operating as expected based on the first result being within a similarity threshold of the second result.