ScaleCrafts

Design a distributed key-value store

HardReplicationPartitioningConsistency

Build a highly available key-value database that spreads data across many machines, like DynamoDB or Cassandra.

Functional requirements

  • put(key, value) and get(key)
  • Configurable consistency per request
  • Add and remove nodes without downtime

Non-functional requirements

  • Single-digit millisecond reads and writes
  • Survives node and rack failures
  • Scales to petabytes

Scale

  • 10 PB of data
  • 1M operations per second
  • Values up to 1 MB

How you’ll be scored

10 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works

What interviewers look for

  • Clarify before you draw. State what is in and out of scope. For “Design a distributed key-value store”, that starts with: put(key, value) and get(key); Configurable consistency per request; Add and remove nodes without downtime. Interviewers notice candidates who pin the requirements down first.
  • Turn the scale into numbers. The scale (10 PB of data; 1M operations per second; Values up to 1 MB) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
  • Show how each quality is met. Your design should visibly deliver: Single-digit millisecond reads and writes; Survives node and rack failures; Scales to petabytes. Saying that it does isn’t enough; point to the part of the design that makes it true.
  • Expect follow-ups on the hard parts. Interviewers usually probe replication, partitioning and consistency here. This is a hard problem, so interviewers expect depth: what breaks first at this scale, how each failure is contained, and which trade-offs you accepted on purpose.
  • Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.

Related problems

Loading your workspace…