How it works
A quorum is the number of replicas that must respond before an operation counts as done. Let N be replica count, W required write acknowledgments, and R required read responses. With N = 3 and W = R = 2, any two replicas that took a write share at least one replica with any two that answer a read. For example, A and B acknowledge v2 while C still holds v1. A read reaches B and C, receives v2 and v1, and returns v2 because its version is newer.
Waiting for more responses raises latency, since a slower replica now counts, and can lower availability: with N = 3, W = 3 fails when one replica is down, while W = 2 tolerates it. W = 1 acknowledges quickly but leaves a larger stale-read and data-loss window. Cassandra exposes this choice per request through consistency levels such as ONE and QUORUM.
The W + R > N rule provides overlap under a stable replica set, but not linearizability. Linearizable means every operation appears to take effect at one instant between its start and finish, so once a read has returned a value, no later read returns an older one. Quorums can break this: an unfinished write reaches only A, one read through A and B returns the new value, then a later read through B and C returns the old one. Sloppy quorums and changing membership add more gaps. Closing them takes further rules, such as reads that write back what they saw, or consensus, as etcd does with Raft.
N = 3, W = 1, R = 1. A write succeeds on one node and a read goes to a different node. What can happen?
The read may return an older value before replication reaches it. If immediate visibility matters, use stronger coordination or a session-level read-after-write path.
Use this as a guide for self review; written answers are not graded.Keep in mind
- W + R > N gives overlap for fixed replica sets, subject to assumptions.
- Tune quorum settings to latency, freshness, and failure needs.