Medium45 min read· Infrastructure

Design a Key-Value Store

Consistent HashingReplicationRead/Write Paths
Asked at:AmazonGoogle

Problem Statement

Design a system like a Key-Value Store. The system should be highly available, scalable to millions of users, and handle the core use cases including consistent hashing, replication, read/write paths.

1

Step 1Clarifying Questions

Start by asking the right questions to narrow scope. What is the expected user base? What are the latency requirements? Read vs write ratio? Geographic distribution?

2

Step 2Requirements

Define functional requirements (core features the system must support) and non-functional requirements (scale, performance, availability, consistency).

3

Step 3Capacity Estimation

Calculate QPS, storage requirements, bandwidth needs, and memory requirements. Work through the numbers with real estimates to size the system properly.

4

Step 4High-Level Design

Draw the architecture — clients, load balancers, application servers, caches, databases, message queues. Every component justified with a reason.

High-level architecture diagram

Interactive, zoomable system diagram with annotated components

5

Step 5Deep Dives

Explore key technical decisions: database choice, caching strategy, data model design, specific algorithms, consistency guarantees, failure handling.

6

Step 6Trade-offs & Alternatives

Discuss alternatives considered, why you chose one approach over another, and what you'd change if requirements shifted.

Common Mistakes

  • ×Not clarifying requirements upfront — jumping straight to solution
  • ×Over-engineering the initial design with unnecessary complexity
  • ×Ignoring non-functional requirements like scalability and availability
  • ×Not discussing trade-offs between different approaches
  • ×Forgetting to estimate capacity and size the system properly

Practice this in mock interview mode

Premium: 45-minute timed session with hidden answers and rubric evaluation.

Get Premium →