Quorum
A voting rule for replicated systems: requiring read and write sets to overlap (R + W > N) guarantees reads see the latest write, giving tunable consistency in Dynamo-style stores.
By Ratish Jain · Updated
Definition
A quorum is the minimum number of nodes that must acknowledge an operation for it to count as successful. In a system with N replicas, a write quorum W is the number of replicas that must ack a write, and a read quorum R is the number that must respond to a read.
The key rule is R + W > N: when the read set and write set are forced to overlap by at least one node, every read is guaranteed to include a replica holding the latest acknowledged write.
Why It Exists
Replicating data across N nodes raises a question: how many must agree before we trust an operation? Waiting for all N gives strong consistency but zero availability if one node is down. Waiting for just one is fast and available but may return stale data.
Quorums provide a tunable middle ground. By choosing R and W, you dial the balance between consistency, availability, and latency — the same tension the CAP theorem describes — per workload.
How It Works
A coordinator sends the operation to all N replicas but returns success as soon as the quorum responds. If R + W > N, the overlap guarantees at least one read replica has the newest version; conflicts are resolved with version numbers, timestamps, or vector clocks (read-repair fixes stale replicas).
Examples: with N=3, W=2, R=2 gives strong-ish consistency (overlap of 1) while tolerating one node down. W=1, R=1 is fast but eventually consistent. W=N makes reads cheap (R=1) but writes fragile. A majority quorum (> N/2) is what consensus protocols like Raft and Paxos use to prevent split-brain, since two majorities cannot both exist.
What It's Used For
- Tunable consistency in Dynamo-style stores (Cassandra, DynamoDB, Riak).
- Ensuring reads observe the latest write without contacting every replica.
- Consensus algorithms (Raft, Paxos) commit once a majority agrees.
- Leader election: a candidate needs majority votes to become leader.
- Surviving node failures while still guaranteeing bounded staleness.
R + W > N
Tradeoffs
- Tunable per operation: trade consistency, latency, and availability with R and W.
- Tolerates node failures without giving up correctness (R+W>N).
- No single leader required — any coordinator can drive a quorum.
- Higher R or W means higher latency and lower availability.
- Needs conflict resolution (version vectors, LWW) for concurrent writes.
- Quorum overlap guarantees recency, not full linearizability by itself.
- Even number of nodes wastes a vote and complicates majority.
When to Use / Avoid
- Use when
- You replicate data and want to tune consistency vs availability per request rather than accept a fixed model.
- Avoid when
- A single-leader system already gives the consistency you need, or latency budgets can't afford waiting for multiple acks.
- Real-world
- Cassandra's QUORUM consistency level; DynamoDB quorum reads/writes; Raft commits on a majority quorum.
Interview Questions
Because forcing the read set and write set to together exceed N means, by the pigeonhole principle, they must share at least one node. That overlapping node participated in the latest committed write and is included in the read, so the read observes the newest version (assuming version comparison to pick it).
For balanced strong-ish consistency with fault tolerance, W=2 and R=2: overlap of 1 guarantees recency, and the system survives one node down. For write-heavy low-latency workloads use W=1, R=3 or accept eventual consistency with W=1, R=1. For read-heavy consistent reads, W=3, R=1 makes reads cheap but writes require all nodes up.
- →Quorum = minimum acks needed; N replicas, W write quorum, R read quorum.
- →R + W > N forces overlap, so reads see the latest committed write.
- →Tunable knob for the consistency/availability/latency tradeoff.
- →Majority quorum (>N/2) underlies Raft/Paxos and prevents split-brain.
- →Needs version vectors or timestamps to resolve concurrent writes.
Related
Everything on Archprimer is connected — follow the graph.