Skip to content
~100s Visual Explainer

Majority Quorum

Understanding R+W>N — how distributed systems guarantee reads see writes using quorum overlap.

How Many Nodes Must Agree? R1 v1 R2 v2 R3 v1 R4 v2 R5 v1 Client Read Which value is correct? ? Majority = ⌊N/2⌋ + 1 R1 R2 R3 R4 R5 Majority (3 of 5) Pigeonhole Principle Any two groups of 3 nodes from 5 must share at least 1 node Write to W Nodes R1 X ✓ R2 X ✓ R3 X ✓ R4 (old) R5 (old) Write Quorum (W=3) Write "X" W = 3 3 nodes confirmed Read from R Nodes — Overlap Guaranteed R1 X W R2 X W+R R3 X W+R R4 (old) R R5 (old) OVERLAP — Read sees the write! R + W > N 3 + 3 > 5 6 > 5 ✓ Guaranteed Overlap At least 1 node in both quorums has latest write Tunable Consistency Strong Consistency R=3, W=3 (N=5) 3 + 3 > 5 ✓ ✓ Every read sees every write ✗ Higher latency (wait for 3) Use: Transactions, inventory Eventual Consistency R=1, W=1 (N=5) 1 + 1 < 5 ✗ ✓ Low latency (wait for 1) ✗ May read stale data Use: Caching, social feeds
1 / ?

How Many Nodes Must Agree?

In a replicated storage system, writes go to some nodes while reads may hit different nodes. Without coordination, a read might miss a recent write entirely.

The question: How many nodes must participate in writes and reads to guarantee consistency?

  • Replicas may have different values at any moment
  • Network delays mean not all nodes update simultaneously
  • Need a rule that guarantees reads see writes

Majority = ⌊N/2⌋ + 1

The solution: require a majority of nodes for operations. With N=5 nodes, majority is 3. The key insight: any two groups of 3 nodes from a set of 5 must share at least 1 node.

This is the pigeonhole principle — there aren't enough nodes for two majorities to be completely separate.

  • Majority quorum: ⌊N/2⌋ + 1
  • N=3 → 2, N=5 → 3, N=7 → 4
  • Two majorities always overlap
  • Overlap guarantees information transfer

Write to W Nodes

When writing, wait for acknowledgment from W nodes before returning success. These W nodes form the "write quorum" — they definitively have the latest value.

The write isn't considered complete until W nodes confirm.

  • Write quorum W: Nodes that must acknowledge
  • Typically W = majority for strong consistency
  • Remaining nodes update asynchronously
  • Write fails if fewer than W nodes available

Read from R Nodes — Overlap Guaranteed

When reading, contact R nodes and return the latest version seen. If R + W > N, at least one node must be in both the read and write quorums.

That overlapping node has the latest write, so the read will see it.

  • R + W > N ensures overlap
  • Minimum overlap = R + W - N nodes
  • Read returns highest version among responses
  • Read repair can update stale nodes in background

Tunable Consistency

The R+W>N formula lets you tune the trade-off:

  • Strong consistency (R=3, W=3): Every read sees every write, but operations are slower (wait for 3 nodes)
  • Eventual consistency (R=1, W=1): Fast operations, but reads may miss recent writes

Choose based on whether your application can tolerate stale reads. Some systems allow configuring R and W per-operation for different consistency levels.

What's Next?

Now that you understand quorum mechanics, explore how they're used in practice: Raft Consensus builds on quorum for leader election, Eventual Consistency shows what happens without quorum guarantees, and Consensus covers the broader theory.