What Is Database Replication?
An introduction to why databases replicate data across multiple nodes, and the fundamental trade-offs that follow from that decision.
System Design › Database Replication
How databases stay in sync across multiple nodes — leader/follower, multi-leader, and leaderless replication.
An introduction to why databases replicate data across multiple nodes, and the fundamental trade-offs that follow from that decision.
How single-leader replication works under the hood — the leader-follower model, the replication log, and the trade-off between synchronous and asynchronous replication.
The operational side of leader-based replication — how to add a new follower without downtime, and what actually happens when nodes fail.
How databases actually ship changes from leader to followers — the four approaches to replication logs, their trade-offs, and why the format you choose affects everything from rolling upgrades to change data capture.
What happens when asynchronous replication lets followers fall behind — and the first concrete problem it causes: reading your own writes.
Two more subtle problems caused by replication lag — monotonic reads and consistent prefix reads — and the approaches that address all three consistency guarantees together.
Three scenarios where multi-leader replication makes sense — multi-datacenter deployments, offline-capable clients, and collaborative editing — and why write conflicts are the price you pay.
Why write conflicts are unavoidable in multi-leader setups, the full spectrum of resolution strategies from last-write-wins to CRDTs, and what actually counts as a conflict.
How multi-leader systems wire their nodes together — circular, star, and all-to-all topologies — and why all-to-all introduces a causality problem that version vectors solve.
How Dynamo-style databases let any node accept writes, tolerate node failures without failover, repair stale replicas through read repair and anti-entropy, and tune the quorum condition w + r > n.
Why w + r > n is a probability dial rather than a guarantee — the edge cases that return stale data anyway, the consistency guarantees quorums never provide, and why staleness is so hard to monitor.
What a leaderless database does when a client cannot reach its quorum at all — why the fix buys durability rather than consistency, and how the same model stretches across datacenters.
Why concurrent writes survive even a strict quorum, why last-write-wins is only safe for keys you never rewrite, and why two operations minutes apart can still be concurrent.
How a database tells an overwrite from a conflict — the version-number algorithm behind siblings, why merging by union resurrects deleted items, and what a version vector adds once there is no single replica.
Closing the Database Replication series — the four reasons to replicate, the three approaches side by side, and the one trade-off that turns out to be underneath all of them.