SystemKit

Key-Value Store

Build up a Dynamo-style store: partitioning, replication, quorums, versioning, failure detection, and repair. It puts the tradeoffs between consistency and availability into concrete read and write paths.

Lessons

  1. 01Define the key-value contractA small API still needs precise durability, size, and consistency promises.
  2. 02Partition the key spaceGive each key a predictable home while limiting movement when nodes change.
  3. 03Replicate across failure domainsKeep independent physical copies so one node does not own the only durable value.
  4. 04Choose read and write acknowledgmentsW and R determine how many replicas a coordinator waits for.
  5. 05Resolve concurrent versionsIndependent writers can update the same key without one obvious winner.
  6. 06Serve through temporary failureFailure suspicion, substitute replicas, and recovery each need a plan.
  7. 07Repair replica driftCompare data efficiently so long-lived divergence does not become permanent.
  8. 08Trace a local read and writeDurable acknowledgment depends on the path inside a replica.
  9. 09Test the promises under failureRouting, convergence, and durability must remain observable under stress.

Practice this chapter

  1. LabWhen can a quorum read return stale data?Choose N, W, and R, take replicas down, and see exactly when a read can miss the latest write.
  2. TaskDesign a session store for a global websiteApply key-value replication to short-lived data where reads dominate and a logout must not be undone by replication.