InterviewLegend

Design a Distributed Key-Value Store

Signature problem
Alex Chen45 min readAdded 1,382 real interview reports

A key-value store is the simplest database there is. You give it a key and a value, and later you get the value back by its key. There are no tables and no query language. Redis, DynamoDB, Cassandra and Azure Cosmos DB all have this at their core, and plenty of bigger systems sit on top of one. On one machine it's a hash map, and you could code it in fifteen minutes. The interview starts when it has to run on sixty machines. Now every key needs an owner and some number of copies. A read has to promise something when those copies disagree, and a machine can die halfway through a write. The rest of this lesson takes those questions in that order.

The Microsoft angle
This prompt reaches Microsoft loops in a few shapes. Some are pure design ("a key-value store like DynamoDB"), and others start in code: build a cache, then make it distributed. Candidates report it from SDE II (L61, L62) up to Senior (L63), so be ready to write the single-node class and then grow it.

MicrosoftPremium lesson · System design round

The Microsoft design, worked end to end.

  1. The API and data modelSystem design · Signature problem
  2. The design, drawn out3 diagrams
  3. 5 deep divesWith the tradeoffs
Get the Microsoft questions

$49 a year · all 107 companies · instant access

1,382 Microsoft interview reports · guide updated

Microsoft interview guide

Know what Microsoft asks before you walk in.

21 coding · 9 system design · 24 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Microsoft interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.