Quorum R/W Tuning Lab (Interactive)
Tune N, R, W, and live replicas to trade consistency against availability. Drive the W+R>N quorum invariant and binomial availability to show how replica survival gates read and write success.
Dynamo Tunable Quorums: N / W / R Against Live Replicas
Pick the consistency dial (R=1,W=1 AP … N=N CP) and kill replicas to see which operations survive.
No operations yet. Try R=W=1, drop a replica, then set W+R>N and compare behaviour.
Dynamo is masterless: any node can coordinate. When W+R>N, read and write quorums must intersect, so a read is guaranteed to see the latest committed write. Below that overlap, concurrent writes create sibling versions that vector clocks order causally and client code (or last-writer-wins) resolves. Dead nodes are temporarily replaced by predecessor replicas via hinted handoff, and Merkle trees diff replica subtrees so read-repair ships only the divergent hashes, not whole datasets.
How It Works Under the Hood
Dynamo-style stores let you trade consistency for availability through the R and W knobs over N replicas. Requiring W+R>N makes read and write sets overlap, so a read is guaranteed to see the latest write, with version vectors or last-writer-wins resolving siblings. But every knob you tighten costs availability: the probability at least W replicas are alive is a binomial over per-replica uptime, so strong writes fail more often during partial outages. Flip W and R across the spectrum and issue attempts with some replicas down to feel the difference between succeeded and conflicted.
Core Architectural Principles
- W+R>N guarantees read/write overlap; W=1,R=1 favors availability, W=N,R=1 favors durability.
- P(write succeeds) equals a binomial over at least W of N replicas alive at per-replica uptime.
- Alive replicas below W or R make an attempt fail or return stale sibling versions.
State the quorum rule W+R>N and what it buys — overlap ensures the freshest replica is always in the read set. Then show the dial: a shopping cart wants W=2/R=2, hard consistency wants W=N. Bring up sloppy quorum, hinted handoff, and Merkle-tree anti-entropy for the unavailable-replica case, and mention read-repair. The binomial availability math elevates the answer.
Raising W and R strengthens consistency and durability but lowers read/write availability during partial node failures.