Database Replication Explained: Single-Leader, Multi-Leader, and Leaderless
What replication lag actually breaks, and how single-leader, multi-leader, and leaderless models trade off consistency for availability.
On this page
A single database server, however fast, has three structural limits: it’s a single point of failure, it has a ceiling on how many reads it can serve, and it can only be physically close to some of your users. Replication — keeping copies of the same data across multiple machines — addresses all three at once. The genuinely hard engineering problem it introduces isn’t storage; it’s coordination: when a write happens, which copy is authoritative, how fast do the others catch up, and what happens when two copies disagree.
Why replicate at all
None of these three benefits require anything clever — copying data solves all of them. The complexity shows up entirely in how writes propagate and how conflicts get resolved, which is why replication strategies are named for exactly that: who’s allowed to write, and how.
Single-leader replication: one node decides
The most common model: one node is designated the leader, and all writes go through it. The leader applies the write locally, then propagates it to followers (replicas), either synchronously (wait for confirmation before acknowledging the write) or asynchronously (acknowledge immediately, propagate in the background).
- Why it’s the default: correctness reasoning is simple. There’s exactly one place a write can happen, so there’s never an ambiguous question of which of two conflicting writes should win — they can’t conflict, because they never happened concurrently on different nodes.
- The cost: replication lag. Asynchronous propagation means followers are behind the leader by some interval, however small. A client that writes, then immediately reads from a lagging follower, can see stale data — “read-your-own-writes” is a real problem that has to be explicitly engineered around (routing a user’s own reads to the leader right after their write, for example), not something single-leader replication gives you for free.
Every replication strategy that isn’t fully synchronous has some version of this problem. The question worth asking about any replicated system isn’t “does it have replication lag” — it almost certainly does — but “what does this specific application do when a client reads data that’s a few hundred milliseconds stale.”
Multi-leader replication: more than one place writes can happen
Multi-leader replication allows writes at more than one node — commonly one leader per data center or region, each accepting local writes and replicating to the others. The obvious motivation: a user writing to their nearest regional leader gets low write latency, instead of every write round-tripping to a single leader on the other side of the world.
The cost is exactly what single-leader replication avoided: conflicting concurrent writes. If two users in two regions update the same record before either region has heard about the other’s write, the system now has two valid-looking versions of the truth and has to reconcile them — last-write-wins (simple, but silently discards one write), custom merge logic (correct, but application-specific and genuinely hard to get right), or surfacing the conflict for manual resolution.
Do
Reach for multi-leader replication when write latency across regions is a real, measured problem and your data model can tolerate — or has a real conflict resolution strategy for — concurrent writes to the same record.
Don't
Adopt multi-leader replication as a default “more available” upgrade. The conflict resolution problem it introduces is genuinely hard, and picking wrong (silent last-write-wins on data where that’s unacceptable) is a correctness bug, not a performance trade-off.
The sharpest failure mode: split-brain
A network partition can cause two nodes to each independently believe they’re the sole leader, both accepting writes with no awareness of the other. This is split-brain, and it’s dangerous precisely because both sides keep functioning normally from a client’s point of view — the failure is invisible until the partition heals and the two divergent histories have to be reconciled, at which point real writes can be silently lost depending on the resolution strategy.
Leaderless replication: no single point of authority
A third model removes the leader concept entirely. Any replica can accept a write; the system uses quorums — requiring a write to succeed on at least W replicas and a read to check at least R replicas, with W + R > total replicas guaranteeing overlap — to stay consistent without ever designating one node as authoritative. Read repair (fixing stale replicas discovered during a read) and background synchronization keep replicas converging over time.
This removes the single-point-of-failure risk a leader represents entirely — no leader means no leader election, no split-brain in the traditional sense. The trade-off moves into the client or coordination layer: without one authoritative node, “what is the current value” becomes a quorum computation rather than a single lookup, which is more complex to implement correctly and reason about under partial failures.
Choosing between the three
| Single-leader | Multi-leader | Leaderless | |
|---|---|---|---|
| Write coordination | Simple — one path | Complex — conflict resolution needed | Complex — quorum-based |
| Write latency | Higher for far-from-leader clients | Low, local-region writes | Tunable via quorum size |
| Single point of failure | Yes — the leader | Per-region, not global | No |
| Best fit | Most applications — simplicity wins by default | Multi-region apps needing local write latency | High-availability systems tolerating eventual consistency |
Takeaway
Every replication strategy is answering the same question differently: when a write happens, who decides it’s valid, and what happens to every other copy in the meantime. Single-leader answers it simply — one node decides, always — at the cost of routing every write through a single place. Multi-leader trades that simplicity for lower regional write latency, and pays for it with real conflict resolution complexity. Leaderless removes the single point of failure entirely, at the cost of pushing consistency reasoning into quorums instead of a single source of truth. None of the three is universally correct — the right one depends on whether your system’s hardest constraint is write latency, availability, or the simplicity of never having two conflicting versions of the truth to reconcile.
Frequently asked questions
Why do databases replicate data instead of just running on one powerful machine?
Replication solves three problems a single machine can't: fault tolerance (a copy survives if one machine fails), read scaling (multiple replicas can serve read traffic in parallel), and latency (data placed geographically closer to users reaches them faster). No single machine, however powerful, provides any of these — they require copies of the data existing in more than one place.
What is replication lag and why does it matter?
Replication lag is the delay between a write landing on the leader and that same write becoming visible on a replica. It matters because a client reading from a lagging replica can see stale data — placing an order and then not seeing it on a follow-up read, because that read hit a replica that hasn't caught up yet. This is the direct, user-visible cost of asynchronous replication.
What's the difference between single-leader and multi-leader replication?
Single-leader replication routes all writes through one designated node, which then propagates changes to replicas — simple to reason about, since there's never a question of which write wins. Multi-leader replication allows writes to more than one node, useful for multi-region setups where each region wants local write latency, but it introduces the hard problem of resolving conflicting concurrent writes to the same data.
What is split-brain, and why is it dangerous in a replicated database?
Split-brain happens when a network partition causes two nodes to each believe they are the sole leader, both accepting writes independently. When the partition heals, the two histories have diverged and must be reconciled — and any reconciliation strategy risks silently dropping or overwriting real writes. It's the sharpest failure mode of leader-based replication under network partitions.
Why would a system choose leaderless replication over single-leader?
Leaderless replication (no single node designated as authoritative) avoids the single point of failure a leader represents and tolerates individual node failures gracefully, using techniques like quorum reads/writes and read repair to stay consistent. The trade-off is more complexity in the client or coordination layer, since there's no single node to ask 'what's the current value' with full confidence.
/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.