Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a High-Throughput Single-Node Key-Value Store

Design one-node storage for fifty million key-value pairs and a million operations per second, then define the boundary where the constraint must change.

Problem statement

For this exercise, assume that a client writes and reads a key through one logical node while the system stays within memory, disk, latency, and recovery limits. Write or replace a value under an explicit consistency and durability contract. Read the latest committed value for a key with a bounded not-found result.

Recover committed state and resume traffic after process or machine failure. Report saturation and reject or shed work before corrupting state. Store 50 million key-value pairs and serve one million operations per second with an even read/write split.

Assume keys average 32 bytes, values average 256 bytes, and p99 reads should remain under 10 milliseconds. For this exercise the primary serving path is constrained to one machine; the design must state when that assumption becomes infeasible.

Preserve this invariant: acknowledged writes have one monotonic sequence and are recoverable; compaction never makes a committed value disappear. Keep unrelated product features and company-specific infrastructure outside the first version.

What to build

  1. Write or replace a value under an explicit consistency and durability contract.
  2. Read the latest committed value for a key with a bounded not-found result.
  3. Recover committed state and resume traffic after process or machine failure.
  4. Report saturation and reject or shed work before corrupting state.

At scale

  • For this exercise, store 50 million key-value pairs and serve one million operations per second with an even read/write split.
  • For this exercise, assume keys average 32 bytes, values average 256 bytes, and p99 reads should remain under 10 milliseconds.
  • For this exercise, the primary serving path is constrained to one machine; the design must state when that assumption becomes infeasible.