Replication
maang.io System Design Series
Replication keeps copies of your data on multiple machines so the system survives failures and serves reads at scale. The whole subject is choosing who can accept a write and how fast copies converge — single-leader (simple, one writer), multi-leader (write anywhere, resolve conflicts), or leaderless quorums (Dynamo-style). Every choice trades consistency against availability, the CAP tension made concrete.
This deep dive comes in three parts:
- Foundations & Core Concepts — the three replication models and synchronous vs asynchronous.
- Internals — replication logs, lag, read-after-write guarantees, and failover/split-brain, with worked numbers.
- Interview — Staff/Principal Q&A: consistency guarantees, failover reasoning, and model selection.