Concept · Replication & partitioning

Quorum reads and writes

With N replicas, R + W > N makes every read overlap the latest write.

3 minleaderless replicationDynamoN R Wsloppy quorum

Leaderless databases in the Dynamo tradition — Cassandra, ScyllaDB, Riak — store each key on N replicas and let clients choose how many must respond:

  • a write succeeds once W replicas acknowledge it;
  • a read asks replicas and waits for R responses, keeping the newest version.

The overlap rule

If R + W > N, any set of R replicas shares at least one replica with any set of W replicas, so every read includes at least one replica holding the latest successful write.

NWRR + W > N?Survives (writes / reads)Character
322Yes1 down / 1 downBalanced default
331Yes0 / 2Fast reads, fragile writes
313Yes2 / 0Fast writes, fragile reads
311No2 / 2Fastest; reads can be stale
533Yes2 / 2More fault tolerance

Try it: write with a low W, read with a low R, and watch the worst-case read miss the latest value. Then take replicas down.

InteractiveQuorum reads and writesOpen in Labs
Loading interactive…

With R + W > N, even the worst-case read set includes a replica that took the latest write. Lower either quorum to make stale reads possible, or take replicas down to see when operations become unavailable.

Catching replicas up

Replicas that missed a write are repaired by read repair (a read that sees a stale replica writes the newer value back) and anti-entropy (a background comparison of replicas, using Merkle trees to find differences cheaply).

Caveats

  • Sloppy quorums: some systems accept writes on stand-in nodes when the real replicas are unreachable ("hinted handoff"). Availability improves, but R + W > N no longer guarantees overlap.
  • Concurrent writes to the same key still need a conflict rule — often last-write-wins by timestamp, which can drop a write.
  • Not linearizable by itself: without extra steps (such as writing the newest value back to a quorum before a read returns), quorums don't give the "single copy" behaviour of linearizability (see consistency models).

Cassandra exposes these as per-request consistency levels such as ONE, QUORUM and LOCAL_QUORUM.

Learn it in depth