Jump to a problem, path or page
Jump to a problem, path or page
01 · Develop the design
Place keys on a consistent-hash ring, replicate each to N nodes, and let a coordinator succeed a write after W acknowledgements and a read after R answers, repairing divergent replicas in the background.
Stage 1
Hash keys onto a ring
Consistent hashing with virtual nodes spreads keys evenly and moves only a small share when nodes join or leave. A key's N replicas are the next N distinct nodes on the ring.
Stage 2
Pick W and R deliberately
R + W > N gives read-your-writes overlap. W = N makes every node failure a write outage.
Stage 3
Repair what the quorum missed
Use hinted handoff while a node is down, then read repair and anti-entropy to converge replicas.
02 · Work through the method
03 · Justify the choices
With N = 3, which setting guarantees a read sees the latest acknowledged write?
W = 2, R = 2
R + W > N means every read quorum overlaps every write quorum in at least one replica.
What happens to a W = 3 write when one of three replicas is down?
It fails, because three acknowledgements are impossible
Requiring every replica makes writes unavailable during any single failure. W = 2 tolerates one.
How does a replica that missed writes catch up?
Read repair, hinted handoff and background anti-entropy
Hints replay writes held for a dead node; read repair and Merkle-tree anti-entropy fix anything still divergent.
04 · Plan the evidence