Skip to content
We areTOP 1%

How do quorum reads and writes work, and why does R + W > N matter?

HardConceptCAP, Consistency & Availability
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

In leaderless replication, each item is stored on N replicas. A write succeeds once W replicas acknowledge it, and a read queries R replicas and keeps the newest version. If R + W > N, every read set overlaps every write set, so at least one replica consulted by a read holds the latest acknowledged write.

  • Common choice: N = 3, W = 2, R = 2 tolerates one unavailable replica for both reads and writes.
  • Tuning: W = N with R = 1 gives fast reads, but writes fail if any replica is down; small R and W favour latency and availability over consistency.
  • Caveats: sloppy quorums, concurrent writes and partially failed writes can still expose stale values, so quorums alone do not guarantee linearizability.
  • Read repair and background anti-entropy bring lagging replicas up to date.

More in CAP, Consistency & Availability

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account