High Availability Database System Using iSCSI and WAL

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current high availability database systems face data loss and inconsistency issues during failover due to sudden crashes or power outages, as data is not timely written to hard-disk drives, leading to irreparable chaos in the database.

Innovation Solution

The database system separates DBMS and DB using the iSCSI protocol for independent communication and employs DRBD mirroring and Write-Ahead-Logging to ensure data consistency and redundancy, with a master server assigning weights to slave servers for load balancing and failover, and utilizing 'keepalived' and 'ipvsadm' for automatic service redirection.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If data is stored in scratch pad memory first to improve operation performance, then system operation performance is improved, but data loss occurs when the system crashes or loses power

Engineering Contradiction:
Improvesystem operation performanceVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements a Write-Ahead-Logging (WAL) mechanism where data is first recorded in a log document file on the storage carrier before being written to the database. This preliminary action ensures that if a crash occurs, the data can be recovered from the log file, preventing data loss while maintaining the performance benefit of using scratch pad memory for active operations.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If a backup device is established to implement failover, then high availability is achieved, but data chaos occurs when the original backup device takes over without complete data

Engineering Contradiction:
Improvehigh availabilityVSAvoiddata completeness
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The system performs preliminary data preparation by writing data to a log document file on the storage carrier before failover occurs. This ensures that when the backup device takes over, it can retrieve complete and consistent data from the log file, preventing data chaos and ensuring data integrity during failover operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements DRBD (Distributed Replicated Block Device) mirroring to create a real-time copy of the storage carrier data. This copying mechanism ensures that the backup device has an up-to-date replica of the data, allowing for seamless failover without data loss or inconsistency.

Inventive Principle:
Principle #26Copying

3Device complexity

If DBMS and DB are integrated in a general database management system, then system simplicity is maintained, but data loss cannot be avoided during crashes

Engineering Contradiction:
Improvesystem structureVSAvoiddata safety
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent separates the DBMS (Database Management System) from the DB (Database) into independent components. The DBMS runs on slave servers while the DB is stored on separate storage carriers. This segmentation allows the storage layer to implement independent data protection mechanisms like WAL and DRBD mirroring, ensuring data safety even during crashes while maintaining manageable system complexity through clear separation of concerns.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11561872B2High availability database system
Publication Date: 2023.01.24 ITEX INT INC
  • US11561872B2 patent drawing

AI summary

A database system includes a master server, a pair of slave servers and a main storage carrier. Each slave server is provided with a database management system (DBMS). The main storage carrier and the pair of slave servers uses the ISCSI protocol to make the pair of slave servers serving as the DBMS and the main storage carrier serving as a database (DB) connect and communicate to further make the DBMS and the DB independent and separate. The master server performs service assignment to the pair of slave servers according to a predetermined weight value. All connections of the database are directed to the slave server with a high weight value, and the other slave server with a low weight value serves as a standby.