Skip to content
Tutorials Center
My learning

Topics

Lesson 62 of 65 Β· Practice and Interviews

The System Design Interview Framework

A repeatable plan for system design interviews: clarify requirements, estimate, sketch the API and data, draw the high-level design, go deep, and discuss trade-offs and bottlenecks.

A system design interview gives you an open-ended problem ("design a news feed") and about 45 minutes. There is no single right answer. The interviewer is watching how you think: whether you ask good questions, make reasonable assumptions, structure your thinking, spot bottlenecks, and weigh trade-offs out loud. A framework gives you a path so that you never freeze, and so you spend time on what matters.

This lesson is a six-step plan you can use for any prompt, including the case studies in this chapter. Practice it until it is automatic.

The six steps

A six-step plan

  1. Clarify
Scope and requirements.
  1. Estimate
Traffic, storage, bandwidth.
  1. API and data
Endpoints and tables.
  1. Big picture
Boxes and arrows.
1 / 2

1. Clarify the problem (3 to 5 minutes)

Never start drawing right away. The prompt is deliberately vague. Ask:

  • Who are the users, and what are the core features? ("Posting and viewing a feed, or also stories, ads, search?") Agree on two to four features and explicitly leave the rest out.
  • What scale? Daily active users, growth, geography.
  • What matters most? Latency, consistency, availability, cost.
  • Constraints: existing systems, platforms (web, mobile), data retention.

Write the agreed requirements down, split into functional and non-functional. This is your contract for the rest of the hour.

2. Estimate (3 to 5 minutes)

Do just enough math to make decisions: requests per second (average and peak), read-to-write ratio, storage per year, bandwidth. The aim is to learn what kind of system this is. A write-heavy system with 40 writes per second does not need sharding; one with 400,000 does. See Back-of-Envelope Estimation Practice for the numbers.

3. Sketch the API and data model (3 to 5 minutes)

List two to five main endpoints with parameters (POST /posts, GET /feed?cursor=). Then the main entities and how they are stored: tables or documents, keys, and the main access patterns. Choosing SQL or NoSQL here should follow from the access patterns, and you should say why.

4. Draw the high-level design (8 to 10 minutes)

Boxes and arrows: clients, load balancer, services, databases, caches, queues, object storage, CDN. Walk through the main flows end to end (the write path, then the read path). Keep it simple first; do not add components you cannot justify.

5. Deep dive (10 to 15 minutes)

Pick the two or three hardest parts, ideally ones the interviewer shows interest in, and go deep: how to generate IDs, how fan-out works, how to shard, how to keep a counter accurate, how to deal with a hot key. This is where you show real depth.

6. Bottlenecks, failures and trade-offs (5 minutes)

Look for single points of failure, scaling limits, and what happens when each component dies. Discuss monitoring, security, and what you would build next with more time. Name the trade-offs you made and what you gave up.

Budget your time

Python A time budget for any interview length

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

If you are running behind, shorten the estimates and the API, never the deep dive: depth is what the interviewer is there to see.

Use numbers to decide, not to impress

Little's law is a handy tool: concurrent requests in flight equals arrival rate times latency. It tells you how many connections or workers you need.

Python Little's law for sizing

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice what a tenfold latency increase does: the same traffic needs ten times the concurrency. This is one reason slow dependencies are so dangerous.

What interviewers look for

  • Structure: a clear order and signposting ("first the write path, then reads").
  • Requirements first: you did not guess; you asked.
  • Reasoning with numbers: estimates that drive decisions.
  • Trade-offs: every choice has a cost, and you name it. Avoid "it depends" without finishing the sentence.
  • Depth where it counts: you can go two or three levels down on a component.
  • Collaboration: you take hints, ask for feedback and adjust the plan.

Common mistakes

  • Jumping into boxes and arrows before agreeing on requirements.
  • Designing for Google scale when the numbers say otherwise (over-engineering), or the reverse.
  • Name-dropping technologies (Kafka, Cassandra) without saying why they fit.
  • Ignoring failure: no replicas, no retries, no idea what happens when the database is down.
  • Spending 30 minutes on one component and never finishing the whole picture.
  • Going silent. Think out loud so the interviewer can follow, and correct you early.

Check your understanding

Quick check Β· 4 questions

of 4 answered You scored / 4 Β· perfect!

  1. 1. What should you do first when given a vague design prompt?

    Agreeing on requirements prevents designing the wrong thing.
  2. 2. You are behind schedule. Which part should you protect?

    Depth shows your real understanding; trim the earlier steps instead.
  3. 3. Why do estimates matter in the interview?

    Numbers decide whether you need sharding, caching or a CDN.
  4. 4. Which is a weak way to talk about trade-offs?

    A trade-off statement names both the gain and the cost.

Summary

  • Follow six steps: clarify, estimate, API and data, high-level design, deep dive, trade-offs.
  • Spend most time on the high-level design and deep dives; protect them.
  • Use numbers to make decisions, and talk through your reasoning.
  • Name trade-offs explicitly; avoid over-engineering and silence.

Next: Back-of-Envelope Estimation Practice