Five nodes share a hash ring, and each key is copied to 3 of them. Change how many copies a write waits for (W) and a read asks (R), crash a node, and see what stays correct.
Try it
Speed
Lab time 3.0 s
Coordinator — W = 2 · R = 2 — healthy — R + W > N
Node A — 14 keys — healthy
Node B — 13 keys — healthy — has user:42
Node C — 10 keys — healthy — has user:42
Node D — 9 keys — healthy — has user:42
Node E — 10 keys — healthy
Write to a replica
W-th confirmation
Read from a replica
R-th answer
Read repair
Hint handed back, or a Merkle compare
Refused
Writes
6.7/s
0 refused, 0 timed out
Reads
16.3/s
0 refused
Write time
176 ms
typical, waiting for 2 of 3
Read time
184 ms
typical, waiting for 2 of 3
Stale reads
0
Healthy: every read saw the newest write
Hints waiting
0
0 handed back, 6 read repairs
Numbers add up:22 writes = 20 confirmed + 0 refused + 0 timed out + 2 in flight; the same for reads; no read is stale while R + W > N, every node is up and no hints were usedThe lab checks this sum as it runs, so a counting mistake would show here.
Controls
Look up a key
Replica
Node state
Version it holds
1. Node C
up
none yet
2. Node D
up
none yet
3. Node B
up
none yet
Newest confirmed write: none yet.
Typical write and read time (ms)
WriteRead
062.51251882501s2s3s
Show data table
Time
Write
Read
1s
166
184
1s
194
192
2s
185
184
2s
184
184
3s
184
184
3s
176
184
What just happened
Nothing yet. Start traffic or run an experiment.
What this model simplifies
Five nodes with 8 points each on the ring, and N fixed at 3.
Messages take 20–150 ms, and 1 in 10 takes 300–700 ms, like a busy disk. Times are illustrative.
Versions are numbers given out by the coordinator. Real stores use timestamps or vector clocks, and two writers can clash.
Anti-entropy compares a Merkle tree with 8 leaves per pair of nodes, one pair every 2 s. Real stores keep deeper trees per key range.
Gossip sends heartbeats every 0.5 s, and a node is suspected after 2 s of silence. Real detectors, such as phi accrual, adapt that wait to the network.
With gossip on, the coordinator acts on what most nodes believe, and it never retries a request that got no reply. Real coordinators often try the next node after a timeout.
A stand-in node that keeps a hint counts toward W, as in Dynamo (a "sloppy quorum"). So with a node down, even R + W > N can give a stale read now and then.