Data replication is the cornerstone of fault tolerance, high availability, and geographic data locality. If data exists on only one machine, any hardware failure, network partition, or power outage causes catastrophic data loss or service downtime.

However, replicating data across multiple physical machines introduces the central challenge of distributed systems: keeping concurrent replicas consistent in the presence of network delays, packet drops, and independent node crashes.

This module deconstructs the three foundational replication paradigms:

  • Single-Leader (Primary-Backup) Replication: Write paths, read scaling, replication lag anomalies (reading your own writes, monotonic reads, consistent prefix reads), and automated failover hazard analysis (split-brain).
  • Multi-Leader (Active-Active) Replication: Multi-datacenter topologies, offline client sync, cross-region replication lag, and mathematical conflict resolution (LWW vs. CRDTs).
  • Leaderless (Dynamo-Style) Replication: Quorum equations (), sloppy quorums, hinted handoff, read repair, and Merkle tree anti-entropy background synchronization.

What you will learn

  • Compare single-leader, multi-leader, and leaderless replication topologies and their operational failure modes
  • Analyze synchronous vs. semi-synchronous vs. asynchronous replication trade-offs regarding durability and write latency
  • Evaluate multi-leader conflict resolution mechanisms: Last-Write-Wins (LWW), Conflict-Free Replicated Data Types (CRDTs), and version vectors
  • Derive strict and sloppy quorum guarantees using the pigeonhole principle: W + R > N
  • Architect anti-entropy background repair using Merkle trees and client-driven read repair
STAGE TOPICS

Topics in this chapter