Dynamo-style key-value store
A leaderless replicated KV store composing consistent hashing, quorum writes, hinted handoff, read-repair and Merkle anti-entropy — the Cassandra/Riak blueprint.
What this design does
The architecture behind Cassandra, Riak and Scylla: no leader, any node coordinates, and availability comes from quorum arithmetic instead of failover. This diagram shows a write meeting W=2 while replica C is dead — the hint stored on a neighbor, the replay path when C returns, and the Merkle-tree repair that guarantees convergence even when hints expire. We've written deep dives on two of these patterns: hinted handoff and Merkle anti-entropy, both on the blog.
The patterns it composes
- Ring consistent hashing — keys map to a virtual-node ring; RF=3 picks the next distinct nodes
- Leaderless replication + tunable quorum — R + W > N gives read-your-writes without a leader
- Hinted handoff — writes survive a dead replica; a neighbor holds its mail
- Read-repair — stale replicas are fixed opportunistically on the read path
- Merkle anti-entropy — background repair locates divergence in O(log n) hash exchanges
- Vector clocks — concurrent writes are detected, not silently overwritten
Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.