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.