Skip to content

System Design Interviews

The system design round is a 45–60 minute conversation in which you design something too large for one machine, out loud, with an interviewer who keeps moving the goalposts. There is no single correct answer. There is a correct process, and most candidates lose points by skipping it.

I start by clarifying functional and non-functional requirements and explicitly scoping out what I will not cover. Then I estimate scale — QPS, storage, bandwidth — so the design is sized rather than guessed. I sketch the API and the data model, draw a high-level diagram with the request path, and then go deep on the one or two components that carry the risk. Throughout I state assumptions, name the bottleneck, and trade off consistency against latency, cost and complexity.

Minutes Stage Output
0–6 Requirements 3–5 functional, 3–5 non-functional, explicit non-goals
6–11 Estimation QPS read/write, storage per year, bandwidth
11–16 API + data model Endpoints, core tables/entities, access patterns
16–26 High-level design Boxes and arrows, one request traced end to end
26–38 Deep dive The risky component: ID generation, feed fan-out, ordering
38–43 Bottlenecks and failure What breaks at 10×, what happens on node loss
43–45 Wrap-up Trade-offs, what you would do differently with more time

Adjust for 60 minutes by extending the deep dive, not the requirements.

Ask, do not assume. Good questions are the ones that change the design:

  • Who are the users and what is the core action? “Shorten a URL and redirect” is different from “shorten, redirect, and report analytics”.
  • Read vs write ratio. 100:1 changes caching strategy completely.
  • Scale. DAU, peak factor, growth. Get a number even if you have to propose one.
  • Latency target. 100ms p99 for a redirect; 2s is acceptable for a report.
  • Consistency. May a user see their own write immediately? Is a stale feed acceptable for 30 seconds?
  • Durability and retention. Can we lose a like? Can we lose a payment?
  • Geography. One region or global? This decides whether you need multi-region.

Then write the non-goals: “I will not design authentication, billing, or the mobile client.” Scoping is a senior signal; it shows you know the budget is finite.

Round aggressively; the interview is about orders of magnitude.

DAU = 10M
actions/user/day = 5 → 50M writes/day
read:write = 20:1 → 1B reads/day
per second = /86,400 → ~580 writes/s, ~11,600 reads/s
peak factor = 3× → ~1,700 writes/s, ~35,000 reads/s

Rules that keep you fast:

  • 1 day ≈ 10^5 seconds (86,400 is close enough).
  • 1M requests/day ≈ 12 requests/s.
  • 1KB × 1B records = 1TB.
  • A single node with a decent SSD and a warm cache handles low thousands of simple queries per second; a single Redis node handles roughly 10^5 operations per second.
  • Bandwidth: 35,000 reads/s × 2KB = 70MB/s ≈ 560 Mbps, so you need more than one egress pipe.

Do not pretend precision. Say “about”, and sanity-check the result against a known system.

Define the handful of endpoints that matter, with the access pattern each one implies:

POST /urls → write, generate id, insert
GET /{code} → read, must be <100ms, cacheable
GET /urls/{code}/stats?from=.. → read, aggregated, can be stale

Then the data model, driven by access patterns rather than by normal form:

urls(code PK, long_url, owner_id, created_at, expires_at)
clicks(code, ts, country, referrer) -- append-only, partitioned by day

State which store and why: “the redirect path needs a key-value lookup with a TTL, so Redis in front of a partitioned table”. Name the partition key — it is the decision that matters most and the one candidates skip.

Draw the request path from the client inward, and label the protocol at each hop:

client → DNS → CDN/edge → load balancer → API service (stateless)
├→ cache (Redis)
├→ primary DB (writes)
└→ read replicas
async: queue → workers → analytics store

Keep the diagram boring. Boring is correct. Every box should have a stated reason, and you should be able to trace one write and one read through it without hand-waving.

Pick the component where the interesting problem lives, and say why you picked it:

  • URL shortener → ID generation and collision handling.
  • News feed → fan-out strategy and the celebrity problem.
  • Chat → message ordering and delivery guarantees.
  • Payments → idempotency and exactly-once effects.

Depth looks like: the data structure, the algorithm, the failure mode, the alternative you rejected, and why. It does not look like naming a product.

Senior candidates volunteer this before being asked:

  • What is the first thing to break at 10× traffic? (Usually the write path or a hot partition.)
  • What happens when a cache node dies? (Thundering herd onto the database.)
  • What happens when the queue backs up? (Backpressure, or unbounded memory.)
  • What is the recovery time, and is the data still correct?
  • What does a deploy do to in-flight requests?

Most rubrics cover four axes:

Axis What earns points What loses them
Problem navigation Clarifying, scoping, prioritising Designing before understanding
Solution design Correct components, data model, request flow Missing a required capability
Technical depth Knowing mechanisms, not names Buzzword bingo
Communication Narrating trade-offs, inviting input Silence, defensiveness

Signals that separate levels: mid-level designs a working system; senior designs it and explains the failure modes and the operational cost; staff narrows the problem to the part that actually matters and says what they would not build.

Follow-up questions (that you should ask yourself)

Section titled “Follow-up questions (that you should ask yourself)”
  1. What is the read:write ratio and does the design reflect it?
  2. Where is the single point of failure, and what is the blast radius?
  3. Which parts are strongly consistent, and did you pay for it where you did not need to?
  4. What is the partition key, and is any partition hot?
  5. What happens on retry? Is the operation idempotent?
  6. What is the cost per request at this scale?
  • Drawing before asking. The most common failure. Five minutes of questions saves twenty of redesign.
  • No numbers. “It will scale” is not an answer. Estimate, then design to the estimate.
  • Buzzword stacking. Kafka, Kubernetes and a service mesh do not fix an undefined data model.
  • Ignoring the write path. Most designs handle reads well and treat writes as free.
  • Silent thinking. The interviewer cannot score what they cannot hear.
  • Refusing to commit. “It depends” without choosing is a non-answer. Say “I would choose X because Y; the cost is Z.”
  • Designing for 1B users when they asked for 10k. Over-engineering is a failure mode; match the design to the stated scale.