Replication quorum calculator
A replicated store keeps N copies of each item. A write is acknowledged once W replicas have it, and a read waits for R replicas to answer. The numbers you pick for R and W decide whether a read is guaranteed to see the latest write, how many replicas can fail, and how long you wait.
Every read reaches at least 1 replica with the latest write, and reads and writes both keep working with 2 replicas down.
One write and one read across 5 replicas
Your setup
Copies of each item.
Replicas that must answer a read.
Replicas that must acknowledge a write.
Majority both ways uses ⌊N/2⌋ + 1 for R and W, the QUORUM level in Cassandra.
The rules
| Rule | Check | Result |
|---|---|---|
| Read and write sets overlap | R + W > N: 6 > 5 | Yes, by at least 1 replica |
| Two writes overlap | W > N / 2: 3 > 2.5 | Yes |
| Majority of N | ⌊N / 2⌋ + 1 | 3 |
| Reads survive | N − R | 2 replicas down |
| Writes survive | N − W | 2 replicas down |
R + W > N guarantees that a read contacts at least one replica that acknowledged the write. It does not by itself make a store linearizable: sloppy quorums, partial writes that failed and concurrent writes can all still return older or conflicting values.
What it shows
A replicated store keeps N copies of each item. A write is acknowledged once W replicas have it, and a read waits for R replicas to answer. Your choice of R and W decides whether a read sees the latest write, how many replicas can fail, and how long you wait.
Choose N, R and W, or start from a preset. The tool checks the overlap rules, counts tolerated failures, draws an example write and read, and can estimate latency.
How to read it
- Reads see the latest write when R + W > N. Otherwise the chance of a miss is C(N − W, R) / C(N, R), assuming the read picks R replicas at random.
- Writes overlap when W > N / 2. If not, two conflicting writes can each succeed on different replicas.
- Failures tolerated are N − R for reads and N − W for writes. The headline is the smaller, since you need both.
- In the diagram, the write goes to the first W replicas and the read to the last R: the smallest possible overlap. The shared replica carries the new value to the reader.
- Latency waits for the R-th fastest reply out of N, not the slowest. The 99th percentile grows faster than the mean.
Questions
What does R + W > N guarantee?
That a read set and a write set must share at least one replica, so a read contacts a copy that acknowledged the latest write. It is the rule in the Dynamo paper and in Cassandra’s consistency levels.
Is a quorum read always up to date?
Not in every system. Overlap is necessary but not enough for linearizability. Sloppy quorums, failed partial writes and concurrent writes can still produce older or conflicting values, so stores add versioning, read repair or consensus.
Why would I choose R = 1?
To make reads fast and available. With R = 1 you need W = N for overlap, which means one down replica blocks writes. Many systems accept stale reads instead and keep both quorums small.
What is a QUORUM in Cassandra?
A majority of the replicas, floor(RF / 2) + 1. With RF = 3 that is 2. Reading and writing at QUORUM gives R + W > N, so the sets overlap.
Does a bigger N always help?
It tolerates more failures and spreads reads, but each write sends more copies and a majority gets larger. Odd values waste less: with majority quorums N = 4 needs 3 replicas and tolerates 1 failure, like N = 3, while N = 5 tolerates 2.
Learn it properly
Sources
Last updated
More tools
All tools- estimatorBack-of-envelope estimatorTurn daily users into requests per second, storage and bandwidth, with the working shown.Open tool
- simulatorConsistent hashing simulatorA hash ring with virtual nodes: key spread per node, and how many keys move when the cluster changes.Open tool
- estimatorQueue latency estimatorWhy latency explodes as servers get busy: utilisation, waiting time and Little’s law.Open tool