SysPad › Examples › Distributed key-value store
Distributed key-value store
A coordinator implements quorum reads/writes (W+R>N) against Keyspaces - the consistent-hashing ring, gossip membership, and vector clocks are internal to the managed Cassandra-compatible store. A scheduled anti-entropy worker reconciles divergent replicas.
The ring abstracted into one managed component, a coordinator layer for quorum logic, a hot-key cache, and Merkle-tree anti-entropy as a background job.
- Throughput: 8,000 req/sec
- First to saturate: Nothing at this load
- Estimated cost: $20k/mo
How it works
- Hot-Key Cache
- Read-through for skewed hot keys. A read tries here first; a write invalidates the entry so the next read repopulates from the ring.
- Distributed Ring (Keyspaces)
- The consistent-hashing ring: gossip membership, vector clocks, replication, hinted handoff, and read-repair all live INSIDE the managed Cassandra-compatible store. The coordinator only chooses replicas and counts W/R acks.
- Read-Repair Worker
- Periodic Merkle-tree anti-entropy: compares replica trees and reconciles keys that gossip and read-repair missed. Off the request path, so it never adds read/write latency.
Request flows
Get (quorum read)
- Client
- DNS
- Load Balancer
- Coordinator
- Hot-Key Cache
- Distributed Ring (Keyspaces)
Put (quorum write)
- Client
- DNS
- Load Balancer
- Coordinator
- Distributed Ring (Keyspaces)
- Hot-Key Cache
Anti-entropy repair
- Anti-Entropy Schedule
- Read-Repair Worker
- Distributed Ring (Keyspaces)