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 \implies \text{strong consistency}\]
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 |
|---|---|---|---|---|
| Strong consistency | 2 | 2 | 3 | Slower, no stale reads |
| 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
At least one node in the read quorum must have the latest write.
Cloud Implementations
ConsistencyLevelset per queryONE: W=1, R=1 — fastest, eventualQUORUM: W=N/2+1, R=N/2+1 — strongALL: W=N, R=N — strongest, lowest availability
- Write always goes to all replicas in region (managed internally)
ConsistentRead: true— equivalent to quorum read (R=majority)ConsistentRead: false(default) — R=1, may read stale
- Paxos consensus across
2f+1replicas (toleratesffailures) - All reads and writes go through Paxos leader — effectively W=N/2+1, R=1 (from leader)
writeConcern: { w: "majority" }— write acknowledged by majorityreadConcern: "majority"— read only committed-by-majority data