Multi-Master Data Replication with Vector Clock Conflict Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Global social networking platforms face challenges in maintaining data consistency and low latency across geographically distributed data centers, leading to potential outages and poor user experiences due to the limitations of single-region data storage.

Innovation Solution

A geographically distributed, multi-master system that employs vector clocks and conflict resolution techniques to ensure consistent data replication across multiple regions, using data read/write engines, conflict resolution engines, and consistency rules engines, along with loop-back queues and message queues for asynchronous replication without the need for distributed transaction coordinators.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If data is stored in a single geographic region, then data consistency is maintained, but latency increases and availability decreases during regional outages

Engineering Contradiction:
Improvedata availabilityVSAvoiddata access latency
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The system segments data storage across multiple geographic regions, allowing data to be accessed from the nearest region. Each region maintains a copy of the data, enabling users to access data locally without waiting for cross-region synchronization, thus reducing latency while maintaining availability during outages in other regions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces vector clocks as an intermediary mechanism to coordinate updates across multiple regions without requiring distributed transaction coordinators. Vector clocks enable deterministic conflict resolution by providing a causal ordering of events, allowing regions to independently resolve conflicts without blocking, thereby maintaining low latency and high availability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If data is replicated across multiple geographic regions, then availability and latency are improved, but data consistency and conflict resolution become problematic

Engineering Contradiction:
Improvedata access latencyVSAvoiddata consistency
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The system uses vector clocks to provide feedback about the causal state of data across regions. Each update carries its vector clock information, allowing receiving regions to determine whether to apply updates immediately or hold them for conflict resolution. This feedback mechanism ensures eventual consistency while allowing fast local reads, resolving the contradiction between speed and reliability.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent changes the parameter of conflict resolution from centralized coordination to distributed deterministic resolution using vector clocks. By changing the resolution strategy to compare vector clock values and apply conflict resolution functions locally, the system achieves consistency without sacrificing the performance benefits of multi-region replication.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If distributed transaction coordinators are used to ensure consistency, then data consistency is maintained, but system complexity and overhead increase

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem architecture complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the coordination function from a centralized distributed transaction coordinator and distributes it to each region through vector clocks. Each region independently maintains vector clock state and resolves conflicts locally using deterministic functions, eliminating the need for complex centralized coordination while maintaining consistency.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Each region serves itself by independently resolving conflicts using vector clocks and deterministic conflict resolution functions. Regions do not need to coordinate with a central authority or other regions to resolve conflicts, as the vector clock mechanism provides sufficient information for each region to make consistent decisions autonomously, reducing system complexity.

Inventive Principle:
Principle #25Self-service

4Reliability

If cross-region synchronization is implemented, then data consistency is improved, but storage overhead and synchronization complexity increase

Engineering Contradiction:
Improvedata consistencyVSAvoidstorage overhead
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The system performs preliminary action by pre-computing vector clock values with each data update. This preliminary tagging of data with causal information enables efficient conflict detection and resolution without requiring additional storage for conflict metadata or complex synchronization protocols, minimizing storage overhead while ensuring consistency.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9830333B1Deterministic data replication with conflict resolution
Publication Date: 2017.11.28 AMAZON TECH INC
  • US9830333B1 patent drawing
  • US9830333B1 patent drawing
  • US9830333B1 patent drawing

AI summary

This disclosure relates to a geographically distributed, multi-master system for storing data records, and associated methods and computer-readable media for replicating data records across geographically distributed data stores of the system in a manner that achieves consistency between data stored in geographically distributed regions as well as deterministic data replication.