Lease-Based Consistency Management for Database Failover

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed database systems face disruptions due to network and other failures, leading to inconsistent data access and potential stale data issues, particularly when failovers occur without proper consistency management.

Innovation Solution

Implementing lease-based consistency management, where database nodes independently determine their roles using consistency leases to ensure consistent access, allowing each node to detect and adapt to failovers, thereby preventing inconsistent reads and writes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If distributed database systems are implemented to scale processing capacity and increase service availability, then productivity and reliability are improved, but data consistency and access reliability deteriorate due to network failures and failover scenarios

Engineering Contradiction:
Improveprocessing capacityVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary actions by establishing consistency leases before failover occurs. The primary database node obtains a consistency lease that spans the failover period, and read-only nodes proactively detect failover and obtain new leases before actual failover happens, preventing inconsistent data access

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback mechanisms where read-only database nodes continuously monitor for failover events and attempt to obtain consistency leases. When a node successfully obtains a lease, it provides feedback to other nodes, enabling them to update their state and maintain consistent data access across the distributed system

Inventive Principle:
Principle #23Feedback

2Reliability

If failover mechanisms are implemented to handle network failures, then reliability is improved, but data consistency deteriorates leading to potential stale data issues

Engineering Contradiction:
Improveservice availabilityVSAvoidstale data
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The system establishes consistency leases that cover the failover period in advance. The primary node's lease spans the expected failover window, and read-only nodes proactively attempt to obtain leases before failover occurs, ensuring they have valid leases and consistent data views when failover actually happens

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The consistency lease acts as an intermediary mechanism that mediates between the primary and read-only database nodes during failover. The lease provides a shared reference that ensures all nodes operate with consistent data views, preventing stale data issues while enabling reliable failover

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If database nodes independently determine their roles without consistency management, then device complexity is reduced, but data consistency deteriorates leading to inconsistent reads and writes

Engineering Contradiction:
Improverole determination complexityVSAvoidaccess consistency
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The consistency lease serves as an intermediary that coordinates role determination across database nodes. Instead of complex inter-node communication protocols, nodes use the lease as a shared reference to independently determine their roles while maintaining consistency, simplifying the system while ensuring reliability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

Database nodes independently obtain and use consistency leases to determine their own roles without requiring complex coordination with other nodes. Each node services itself by monitoring lease status and adjusting its role accordingly, reducing overall system complexity while maintaining access consistency

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11921699B1Lease-based consistency management for handling failover in a database
Publication Date: 2024.03.05 AMAZON TECH INC
  • US11921699B1 patent drawing
  • US11921699B1 patent drawing
  • US11921699B1 patent drawing

AI summary

Lease-based consistency may be implemented for databases to handle failovers. A database node may obtain a consistency lease that describes a point in time determined from a time-to-live amount added to a consistent point in time for database data. While the consistency lease is valid, Multi-version Concurrency Control (MVCC) snapshots assigned by the database node can be used to handle requests to access the database data. Once expired, the database node may have to renew the consistency lease in order to continue to handle write and read requests.