A system design interview feels very different from a coding round. There is no test case that turns green, no single correct output, and the question is often just one line: "Design WhatsApp." Many good programmers freeze here, not because they lack knowledge, but because they do not have a plan for the next 45 minutes.
In the Introduction to System Design chapter we saw that design is about requirements and trade-offs. This chapter turns that idea into a repeatable step-by-step method, and then walks through one complete mock interview so you can see the method in action.
A system design interview is a guided conversation in which you and the interviewer turn a vague problem into a reasonable architecture, explaining your choices and their trade-offs along the way.
What the Interviewer Is Really Checking
The interviewer knows you cannot build WhatsApp in 45 minutes. They are watching how you think. Most companies score something like this:
Signal | What a strong candidate does |
|---|---|
Problem scoping | Asks questions to pin down features and scale before drawing anything |
Structured approach | Moves from requirements to high-level design to details in a clear order |
Technical depth | Can go deep on at least one or two components (database choice, caching, partitioning) |
Trade-off reasoning | Explains why option A over option B, and what A costs |
Handling failure and scale | Spots bottlenecks and single points of failure without being asked |
Communication | Thinks out loud, checks in with the interviewer, accepts hints gracefully |
Notice what is not on the list: knowing the name of every database or memorising one company's real architecture.
The Six-Step Framework
Here is a framework that works for almost any HLD question. The times are for a typical 45-minute round; adjust them for longer interviews.
┌──────────────────────────────────────────────────────────────┐
│ 1. Clarify requirements (~5 min) │
│ 2. Estimate scale (~3-5 min) │
│ 3. Define APIs and data model (~5 min) │
│ 4. High-level design (~10 min) │
│ 5. Deep dive into 1-2 components (~10-15 min) │
│ 6. Bottlenecks, failures, wrap-up (~5 min) │
└──────────────────────────────────────────────────────────────┘
Step 1: Clarify requirements
Never start designing immediately. The one-line question is deliberately vague, and the interviewer wants to see you narrow it down. Ask about:
Core features. "Which features should we focus on? Just one-to-one chat, or groups and media too?" Agree on 2-4 features and say the rest are out of scope.
Users and scale. "How many daily active users? Is traffic spiky?"
Read vs write pattern. "Do people read much more than they write?"
Non-functional goals. Latency target, availability target, consistency needs ("Is it OK if a like count is a few seconds late? Is it OK if a payment is?").
Platform and constraints. Mobile, web, both? Any regions or regulations?
Write the agreed requirements somewhere visible (whiteboard or shared doc). You will refer to them later to justify decisions.
Step 2: Estimate scale
Quick numbers tell you whether you need one server or a thousand. Estimate requests per second (QPS), storage and bandwidth, rounding freely. Keep it short: the goal is the order of magnitude, not exact arithmetic. The full technique is in the Back-of-the-Envelope Estimation chapter.
Step 3: Define APIs and data model
List the main operations as API calls (for example POST /messages, GET /feed) and the main entities with their key fields. This makes the features concrete and often reveals hidden questions, such as how to paginate a feed.
Step 4: High-level design
Draw the main boxes: clients, load balancer, services, databases, cache, queues. Then walk one request through the diagram ("When Asha sends a message, the app calls the chat service, which stores it and then..."). A design that cannot explain a single request end to end is not finished.
Step 5: Deep dive
Pick the one or two most interesting or risky parts, or let the interviewer choose. Typical deep dives: database schema and choice, how to partition data, caching strategy, how to fan out notifications, how to generate unique IDs. This is where you show depth.
Step 6: Bottlenecks, failures and wrap-up
Ask yourself out loud: What breaks first if traffic grows 10×? What if this database dies? What if a whole data centre goes down? Mention monitoring and alerts. Finish with a 30-second summary of your design and what you would improve with more time.
A Complete Walk-Through: Live Cricket Score App
Let us apply the framework to a question an Indian interviewer might genuinely ask: "Design a live cricket score app." Read it as a conversation.
Step 1: Requirements
After a few questions, you and the interviewer agree on:
Functional: (1) users see the live score of a match, updated ball by ball; (2) users see a list of today's matches; (3) a small team of scorers enters each ball's result. Commentary text, video and fantasy teams are out of scope.
Non-functional: huge, spiky read traffic during big matches; a score should reach users within a few seconds of the ball; reading is far more common than writing; the app must stay up even during the final over of a final.
Saying out loud "this system is extremely read-heavy with tiny writes" already points you toward caching and CDNs.
Step 2: Estimates
Assume 5 million people are watching the score at the peak of a big match, the app refreshes every 10 seconds, and each response is about 2 KB. Let us compute it with a script (you would do it by hand in the interview).
# Quick estimate for "Design a live cricket score app" (interview walk-through)
peak_viewers = 5_000_000 # people watching the score during the final overs
poll_every_s = 10 # app refreshes the score every 10 seconds
response_bytes = 2_000 # one score response (JSON), about 2 KB
peak_qps = peak_viewers / poll_every_s
egress_bytes_s = peak_qps * response_bytes
update_bytes = 500 # one ball-by-ball update stored in the DB
balls_per_match = 2 * 20 * 6 # T20: 2 innings x 20 overs x 6 legal balls
matches_per_day = 10
storage_day = update_bytes * balls_per_match * matches_per_day
print(f"peak read QPS = {peak_qps:,.0f} requests/s")
print(f"peak egress = {egress_bytes_s / 1e9:.1f} GB/s = {egress_bytes_s * 8 / 1e9:.0f} Gbps")
print(f"score writes/match= {balls_per_match}")
print(f"storage per day = {storage_day / 1e6:.1f} MB")
Output:
peak read QPS = 500,000 requests/s
peak egress = 1.0 GB/s = 8 Gbps
score writes/match= 240
storage per day = 1.2 MB
What these numbers tell us:
Reads: 500,000 requests per second is far beyond one server or one database. Reads must be served from caches or a CDN.
Writes: a T20 match has only about 240 legal deliveries (a few more with extras), so a few writes per minute. A single database handles this easily.
Storage: about a megabyte a day. Storage is not the problem at all.
The estimate changes the design. The challenge here is not storing data; it is pushing the same tiny piece of data to millions of people at once.
Step 3: APIs and data model
GET /matches?date=2026-11-02 → list of matches (id, teams, status)
GET /matches/{id}/score → current score snapshot
POST /matches/{id}/balls → scorer adds one ball (auth required)
Match (match_id, team_a, team_b, venue, start_time, status)
BallEvent (match_id, innings, delivery_seq, over, ball, runs, extras, wicket, created_at)
ScoreView (match_id, summary JSON, version) ← precomputed snapshot for reads
Notice the ScoreView: instead of adding up hundreds of ball events on every read, the system keeps a ready-made snapshot and updates it once per ball.
Step 4: High-level design
Scorers ──→ [ Score Ingest Service ] ──→ [ Database: BallEvent, Match ]
│
└──→ updates [ ScoreView in cache ]
│
Viewers ──→ [ CDN ] ──(cache miss)──→ [ Load balancer ] ──→ [ Read API servers ] ──→ [ Cache ]
Walk through it:
A scorer records a ball. The ingest service saves the event in the database and rebuilds the ScoreView for that match in the cache, increasing its
version.A viewer's app requests
/matches/42/score. The CDN answers from its copy if that copy is fresh (for example, younger than 2 seconds).If the CDN copy has expired, the request goes to the read API, which returns the snapshot from the cache. The database is never touched on the read path.
With a short CDN expiry, the origin servers see only a tiny fraction of the 500,000 requests per second, because each CDN location asks the origin roughly once per expiry period per match (CDNs collapse simultaneous misses for the same object into one origin request).
Step 5: Deep dive: polling or push?
The interviewer asks, "Can we avoid millions of phones polling every 10 seconds?" Compare the options (the next chapter, Client-Server Architecture & APIs, explains each in detail):
Option | Pros | Cons |
|---|---|---|
Short polling + CDN | Simple; CDN absorbs the load; works everywhere | Updates arrive up to one poll interval late; many requests return "nothing changed" |
Push over WebSocket / Server-Sent Events | Update arrives within a second; no wasted requests | Millions of long-lived connections need many connection servers and a pub/sub layer to fan out updates |
A balanced answer: "Start with polling through the CDN because it is simple and robust under spikes. For users who want ball-by-ball alerts, add a push channel later: the ingest service publishes each update to a pub/sub system, and connection servers forward it to subscribed clients." That is a trade-off, stated clearly, which is exactly what the interviewer wants.
Step 6: Bottlenecks and failures
Cache node dies: run the cache with replicas; the read API can rebuild a ScoreView from the database if needed.
Ingest service dies mid-match: run two instances; make "add ball" idempotent with a unique (match, innings, delivery_seq) key, where delivery_seq numbers every delivery 1, 2, 3, ... including wides and no-balls, so a retry never double-counts runs. (A key on (over, ball) alone would not work: after a wide, the same ball number 18.3 is bowled again.)
Traffic 10× higher in a World Cup final: the CDN and stateless read servers scale out; writes are unchanged.
Monitoring: alert on score-update delay (time from ball entered to ball visible), error rate and CDN hit ratio.
Wrap-up line: "Tiny writes go to a single database; a precomputed snapshot in a replicated cache is served through a CDN with a short expiry; push can be added for faster updates; idempotent writes and redundancy handle failures."
Communication Tips
Think out loud. Silence gives the interviewer nothing to score. Say what you are considering and why.
State assumptions. "I'll assume 5 million concurrent viewers; tell me if that's off."
Check in. After the high-level design, ask: "Shall I go deeper into the cache, or the push mechanism?"
Treat hints as gifts. If the interviewer asks "what happens if this server fails?", they are pointing at a gap. Address it; don't defend the gap.
Use numbers. "500k QPS is too much for a database" is far stronger than "a lot of traffic".
Name trade-offs both ways. "This gives us X, at the cost of Y."
Do | Don't |
|---|---|
Ask clarifying questions first | Start drawing in the first minute |
Begin simple, then scale up | Begin with 15 microservices |
Justify each component with a requirement or number | Add Kafka "because big companies use it" |
Go deep on one or two parts | Stay shallow on everything |
Discuss failures proactively | Assume every machine is always up |
Manage time and summarise at the end | Spend 30 minutes on requirements |
Common Mistakes
Jumping to a memorised design. If you recite "the Twitter architecture" without asking questions, you will solve a problem the interviewer did not ask.
Over-long estimation. Spending 15 minutes on exact arithmetic leaves no time to design. Round aggressively.
Ignoring the read/write ratio. It decides whether to focus on caching (read-heavy) or on write scaling (write-heavy).
Boxes without data flow. A diagram is only useful if you can trace a request through it.
Never mentioning failure. At scale something is always failing. Mention redundancy, retries and monitoring.
Arguing with the interviewer. Disagree politely with reasons if needed, but stay collaborative.
Practice Questions
Q1. You are asked "Design Instagram". What are three good clarifying questions?
(1) Which features are in scope: posting photos, following, the home feed, likes and comments, stories? (2) What scale: how many daily active users and how many uploads per day? (3) What are the latency and consistency expectations, for example must a new post appear in followers' feeds instantly or is a few seconds of delay fine?
Q2. Why do estimates come before the high-level design?
Because the numbers decide the architecture. 50 QPS fits on one server with one database; 500,000 QPS needs caching, CDNs and many servers. Without estimates you either over-engineer or under-engineer.
Q3. The interviewer says "the database is now the bottleneck". Name three possible responses.
Add a cache in front of it for hot reads; add read replicas to spread read traffic; shard (partition) the data across several databases to spread writes. Also consider whether some work can move to a background queue. Pick based on whether the load is mostly reads or writes.
Q4. In the cricket example, why make "add ball" idempotent?
Networks fail, so clients and services retry. If a retry of "4 runs off ball 18.3" were stored twice, the score would be wrong. A unique key on (match, innings, delivery_seq), where delivery_seq counts every delivery including wides and no-balls, makes the second insert a no-op, so retrying is always safe. The key cannot be just (over, ball), because a wide or no-ball is re-bowled with the same ball number.
Q5. How should you use the last five minutes?
Identify bottlenecks and single points of failure, mention monitoring and alerting, summarise the design in a few sentences, and say what you would improve with more time (for example, multi-region deployment or a push channel).
Summary
The interviewer scores your process: scoping, structure, depth, trade-offs, failure handling and communication.
Follow six steps: requirements → estimates → APIs and data model → high-level design → deep dive → bottlenecks and wrap-up.
Estimates are quick and rough, but they decide the design (the cricket app is a read fan-out problem, not a storage problem).
Always walk a request through your diagram and ask "what if this fails?"
State assumptions, think out loud, and explain every choice as a trade-off.
Clarify, estimate, sketch, deepen, stress-test. A calm plan beats a memorised answer.