Quorum Lab
royhp.comA leaderless (masterless) cluster has no primary — every replica is equal and any node can coordinate a request. This is the design behind Amazon DynamoDB, Apache Cassandra and Riak. A value is copied to N replicas; a write waits for W acknowledgements and a read waits for R responses. The golden rule: when R + W > N the read and write quorums are forced to overlap, so every read is guaranteed to see the latest committed write.
Leaderless replication
In a Dynamo-style cluster there is no master to funnel writes through. Each key lives on a preference list of N replicas (chosen by consistent hashing), and whichever node a client reaches acts as coordinator, fanning the request out to the replicas peer-to-peer. There is no failover, no election, no single bottleneck — losing a node just shrinks the set you can reach.
Each replica stamps its copy with a version / timestamp. Here we use last-write-wins by version; real systems may carry vector clocks to detect concurrent writes that need merging.
The R + W > N rule
A write is durable once W replicas ack; a read collects R replies and keeps the newest version it sees. Two subsets of an N-node set whose sizes sum to more than N must share at least one member — so when R + W > N the read quorum is guaranteed to overlap the write quorum and catch the latest value. Drop below the line and a read can land entirely on replicas that missed the write, returning stale data.
This makes consistency tunable: Cassandra’s QUORUM / LOCAL_QUORUM, DynamoDB’s strong vs eventual reads, and Riak’s per-request r / w all dial the same knob. Writes survive N − W failures, reads survive N − R.
Read repair & availability
When a read notices a replica holding an old version, the coordinator pushes the newest value back to it — read repair — so popular keys self-heal. Background anti-entropy (Merkle-tree sync) and hinted handoff mop up the rest. Watch stale nodes flip to the latest version after a read passes through them.
If too many replicas are down or cut off by a network partition, a quorum can’t be reached and the operation fails — the availability cost of strong quorums. Kill nodes, split the cluster, and watch writes or reads stall when fewer than W (or R) replicas remain reachable.