Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Highly Available Distributed Key-Value Store

Design a partitioned, replicated key-value service and compare request-routing choices, consistency, online growth and hot-key behavior.

Problem statement

For this exercise, assume clients store opaque values under keys and issue Get, Put, and Delete operations through a highly available distributed service.

The system should continue serving through individual-node and availability-zone failures, scale by adding nodes, and offer a documented tunable consistency choice per request.

Values are bounded and fit in memory on one replica; range scans, secondary indexes, multi-key transactions, and arbitrary queries are outside scope. Design partitioning, replication, request coordination, conflict handling, rebalancing, repair, and recovery.

For this exercise, assume the clients are internal services of one organization. The source describes a small-company internal service; the large numerical workload below remains the existing practice stress case, not a reported company workload.

Before selecting request routing, compare a centralized coordinator, direct node/client routing through a versioned partition map, and a hybrid with a strongly managed control plane and distributed data path.

Explain where each design can bottleneck or fail and justify the choice without changing the documented single-key consistency contract. Handle a hot read key while continuing safe membership changes.

What to build

  1. Clients can put, get, and delete one opaque value by key with explicit version and consistency semantics.
  2. The service remains available through node and availability-zone failures within the configured consistency policy.
  3. Operators can add, remove, replace, and repair nodes without a full-cluster outage.

At scale

  • For this exercise, assume 10 billion keys, values up to 1 MB, and 2 million requests per second with an 80:20 read/write mix. For this exercise, one key may receive ten percent of reads; hotspot mitigation must preserve the consistency mode requested by the caller.
  • For this exercise, target p99 under 20 ms for quorum operations within one region during normal operation.
  • For this exercise, replicate each key across three failure domains and survive one availability-zone loss without data loss for acknowledged quorum writes.
  • For this exercise, retain deleted-key tombstones long enough for repair to prevent resurrection, with the exact interval treated as an operational setting.