Mission
Interactive Simulation
Before we explain anything — play. Push it until it breaks, then fix it.
Quorum
R + W > N means read and write sets always overlap. Lower numbers are faster and more available.
Repair & conflicts
Break it
What just happened?
Read and write quorums (R and W out of N) decided whether requests survived failed replicas and whether reads were guaranteed fresh. Last-write-wins quietly discarded one of two concurrent updates, while vector clocks kept both as siblings to merge. Replicas that came back after an outage stayed stale until hinted handoff or Merkle-tree anti-entropy repaired them.
The concept
A distributed key-value store combines several building blocks: consistent hashing to partition keys across nodes, replication to N nodes clockwise on the ring, quorum consensus (R + W > N for strong consistency), versioning with vector clocks to detect conflicting writes, gossip to detect failures, sloppy quorums with hinted handoff for temporary failures, and Merkle-tree anti-entropy for permanent drift. Writes go to a commit log and memtable, flushed to immutable SSTables; reads check memory, then Bloom filters, then SSTables.
Trade-offs
Nothing is free. Here's what this solution costs you.
In the real world
Conceptually similar to Amazon Dynamo, Apache Cassandra and Riak.
Mini quiz
With N = 3, which (R, W) pair guarantees reads see the latest write?
Interview me
The app becomes your interviewer. One question, in your own words.
Boss challenge
Survive a 2-node outage
5 replicas per key, 2 of them down, and two clients writing the same key.
Goal: Keep reads and writes available, reads strongly consistent, no lost updates, and repair recovered replicas.
Use the simulator above with no hints. These checks update live as you play.
Interview question
“Design a distributed key-value store that is highly available and scalable. Cover partitioning, replication, consistency (quorums), conflict resolution, failure detection and handling of temporary and permanent failures.”