17 · Quorum Consensus — Majority Agreement for Operations¶
Distributed Transactions · Topic 17 of 20
What is a Quorum?¶
In a distributed system with N replicas, a quorum is the minimum number of nodes that must agree for an operation to succeed.
W + R > N guarantees read/write set intersection for a fixed set of N replicas—not linearizability by itself.
Where:
N= replication factor (total replicas)W= write quorum (nodes that must acknowledge a write)R= read quorum (nodes that must respond to a read)
Quorum Configurations¶
| Config | W | R | N | Trade-off |
|---|---|---|---|---|
| Overlapping read/write quorums | 2 | 2 | 3 | Intersection; needs correct version reconciliation and concurrency handling |
| Write-heavy | 1 | 3 | 3 | Fast writes, slow reads |
| Read-heavy | 3 | 1 | 3 | Fast reads, slow writes |
| Eventual | 1 | 1 | 3 | Fastest, stale reads possible |
How Quorum Prevents Stale Reads¶
graph LR
Client -->|Write W=2| N1["Node 1 ✅"]
Client -->|Write W=2| N2["Node 2 ✅"]
N3["Node 3 ❌ (missed write)"]
Client2 -->|Read R=2| N2["Node 2 ✅ (latest)"]
Client2 -->|Read R=2| N3["Node 3 (stale)"]
N2 -->|"Returns latest (wins)"| Client2
With fixed membership, at least one node in the read quorum participated in the completed write quorum. Choosing the correct returned version additionally depends on reconciliation and concurrent/failed-write semantics.
Cloud Implementations¶
ConsistencyLevelset per queryONE: W=1, R=1 — fastest, eventualQUORUM: each operation waits forfloor(N/2)+1replicas; read/write quorums overlapALL: each operation waits for all replicas; lower availability, not a replacement for linearizable LWT
- Replication is managed internally; the API does not expose
RandWknobs ConsistentRead: truerequests the documented strong-read contract on tables and LSIsConsistentRead: falsepermits stale reads; GSIs do not support strong reads
- Paxos consensus across
2f+1replicas (toleratesffailures) - Writes coordinate through split leaders; read-only snapshots can be served by replicas with a sufficiently advanced safe timestamp
writeConcern: { w: "majority" }— write acknowledged by majorityreadConcern: "majority"— read only committed-by-majority data
Quorum Arithmetic Is Not a Consensus Protocol¶
With N=3, a write to {A,B} and read from {B,C} overlap at B. For a completed write with no conflicting concurrent write, correct reconciliation can return its value. But concurrent writes, clock-based last-writer-wins, failed/partial writes, sloppy quorums and membership changes require additional reasoning. Write/write intersection also needs 2W > N when the algorithm relies on it.
Raft and Paxos use intersecting majorities plus protocol rules for leader/term selection, log ordering and recovery. They agree on a decision history; merely counting read/write responses does not reproduce those guarantees. In Cassandra, quorum reads/writes are not a substitute for lightweight transactions when linearizable conditional updates are required.
MongoDB readConcern: "majority" means reading majority-committed data, not necessarily the newest real-time value. Match the read concern, write concern and session semantics to the required invariant.
Check Your Understanding¶
Source: Spanner read/write protocol.