Skip to content
SD-12 · KEY-VALUE STORE · INTERACTIVE

Break it.
Then fix it.

Push operations at a key-value cluster, watch nodes melt or data go at risk, and add the parts a real store needs. Every switch is a decision you would defend in an interview.

CHALLENGEServe 1M ops/s (80% reads) with p99 under 10 ms, 3 copies of every key, replicas kept in sync and no errors.
StatusSTRAINEDAt 300K operations per second
p99 latency17 msTarget under 10 ms
Errors0%Nothing dropped
Copies of each key3May drift apart
ClientsLIVE
240K reads · 60K writes/s
traffic source
CoordinatorsOK
Hash key → 3 replicas
420K replica ops/s
Gossip ringOK
8 tokens per node
membership, every 1 s
Zone a · 20 nodesOK
B-tree, in-place writes
7.0K ops/s a node · busiest 1.6×
Zone b · 20 nodesDRIFT
Second copy of each key
7.0K ops/s a node
Zone c · 20 nodesSLOW ACK
Third copy of each key
7.0K ops/s a node
Writes wait for the slowest replica. With W = 3, every write waits on all 3 zones, so one slow or dead node sets the p99 at 17 ms. Use W = 2 and R = 2: R + W > N still meets on one replica.
R + W > NQuorum overlapWith N = 3, R = 2 and W = 2, every read meets at least one replica that has the latest write.
1.1×Busiest node with vnodes256 tokens a node even out the ring; 8 tokens leave one node at 1.6×.
1%Bloom false positives10 bits per key, so 99% of SSTables without the key are skipped from memory.
2.2MReplica ops/s at 1MEach write goes to 3 replicas and each read to 2.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.