Courses / System Design Interview / Chapter 39
Module 4 · Wrap-Up · Chapter 39 of 39
How to Practise: A 45-Minute Checklist
Builds on What System Design Is: From One Server to Millions, Back-of-the-Envelope Estimates and Lessons from Real Outages.
Part 1 · What the Round Tests
What the round is for
Ananya had read every building-block chapter twice. In her first mock, for a food delivery app, she asked twelve questions, worked out five years of storage, and drew her first box at minute 19. The feedback was one line: 'Good ideas, but we never saw a design.' She knew enough. What she lacked was practice at using it against a clock, with someone asking 'why?' after every box. This chapter closes that gap.
Companies ask for a design because the decisions that cost most to undo, such as the storage choice, the data model and how services talk, are design decisions. A vague prompt also shows how you handle a problem with no specification, like every real project in its first week. The bar rises with experience:
| Level | What they expect |
|---|---|
| Fresher or intern | A clear high-level design, a sensible storage choice, awareness of scaling |
| 2 to 5 years | Requirements, estimates, a data model, one deep dive done well |
| Senior | Several deep dives, failure handling, cost, and leading the conversation |
At every level, three things are graded: structure, trade-offs and communication. A tidy design you can defend beats a clever one you cannot explain. It also rewards preparation: the same dozen building blocks appear in almost every prompt, so each new question rearranges parts you already know.
Know which round you are in
Many hiring loops include more than one design round, and each tests something different. Ask the recruiter which one you have, or read the prompt: boxes, numbers and failures mean high-level design; classes and method names mean low-level design; a working program by a deadline means machine coding.
Tests: services, stores and queues, then scale, failures and trade-offs, on a whiteboard
Prompt: "Design a ride-sharing app for one city"
Prepare: the six steps, the building blocks, timed mock rounds
Tests: classes and interfaces inside one component, in a design that is easy to extend
Prompt: "Design the parking system for a mall"
Prepare: object-oriented design, SOLID principles, a few patterns such as strategy, observer and state, 10 to 15 classic problems
Tests: a working program in your own editor, often in 90 minutes to 2 hours, with tests and edge cases
Prompt: "Build an in-memory cab booking tool: add drivers, book the nearest, end the trip"
Prepare: timed builds in your strongest language, with tests for edge cases
This course prepares you for the first round only. Prepare for low-level design and machine coding separately, in code. Some habits carry over: asking before designing, naming the entities, the data models and state machines from the product chapters, and cutting scope before you start.
"Would you like a component-level design with scale and failures, or a class-level design?" One question saves 40 minutes of the wrong answer.
Part 2 · The Round, Step by Step
The 45-minute checklist
A 45-minute slot loses about 5 minutes to introductions and to your own questions at the end, which leaves about 40 minutes to design. Here are the six steps of those 40 minutes, each with what you need before you move on.
| Minutes | Step | Move on when you have |
|---|---|---|
| 0–5 | 1. Clarify requirements (5 min) | 3 to 5 functional requirements, the non-functional one that matters most, and what is out of scope, written down |
| 5–8 | 2. Estimate what decides something (3 min) | Peak requests per second, plus any number that changes a choice, each with its assumption |
| 8–13 | 3. API and data model (5 min) | The 3 to 5 calls clients make, and the main tables with their keys and the query each must answer fast |
| 13–22 | 4. High-level design (9 min) | A write path and a read path traced through the boxes, each box there for a reason |
| 22–37 | 5. Deep dive (15 min) | One or two hard parts, chosen with the interviewer: options, a choice and its cost |
| 37–40 | 6. Wrap up (3 min) | The first bottleneck, one failure and its recovery, and what you would build next |
The deep dive gets the largest share because that is where strong answers stand out. In a 60-minute slot you get about 50 minutes to design: requirements 0–6, estimates 6–10, API and data model 10–16, high-level design 16–28, deep dive 28–46 and wrap-up 46–50. Spend the extra time on a second deep dive or a failure walk-through, not on more questions.
Set a timer to beep at minutes 5, 8, 13, 22 and 37 of your design time, and stop at 40, until you can feel the pace without it.
The first five minutes
Step 1 decides everything after it, and prompts are vague on purpose: 'Design a food delivery app.' Ask three to five questions whose answers change the design, not fifteen:
| Question | What the answer changes |
|---|---|
| Who are the users, and how many a day? | Every estimate, and whether one region is enough |
| What is the read-to-write ratio? | Caches and replicas for reads, or shards for writes |
| How fresh must data be? | Whether caches, replicas and queues may lag by seconds |
| What must never happen? | Where you need transactions or idempotency, such as never charging twice |
| What is out of scope today? | What you will not design, so the time goes where it matters |
When the interviewer has no preference, state an assumption and move on: an assumption they can correct costs seconds, and an open question costs minutes. Write the agreed requirements in a corner of the board, and point back to them each time you choose.
When the clock slips
Rounds rarely run to plan, so decide now what you will cut. Two rules hold every time: never skip the requirements, and always save the last three minutes for the wrap-up.
| At minute | If you are still | Do this |
|---|---|---|
| 6 | Asking questions | State the rest as assumptions, ask "Shall I go with these?" and start estimating |
| 10 | Estimating | Keep peak requests per second and the one number a choice depends on; drop the rest |
| 15 | On the API or tables | Name the two main tables, one line each, and start drawing |
| 25 | Drawing boxes | Finish the main write and read paths; leave side features as labelled boxes |
| 37 | In the deep dive | Finish your sentence and wrap up, or the round ends with no summary |
Each move trades detail for time, so the deep dive keeps its 15 minutes.
Follow them. If they skip the estimate, work out peak requests per second in your head and use it when a choice depends on scale.
Talk while you draw
Silence reads as being stuck, and an unexplained box reads as a guess. Narrate each decision with the fact behind it, ideally a number: "Reads outnumber writes about 100 to 1 here, so I will put a cache in front of the database." Numbers beat adjectives: "about 200 ms at the 99th percentile" can be checked, and "fast" cannot.
Each phrase below does one job. Learn the shape, then use your own words.
- Assuming
- "I will assume 5 million daily users and 10 reads per write. Tell me if that is off."
- Choosing
- "Writes peak near 800 a second, well inside one relational primary, and I get transactions and unique constraints. I would shard only past about 10,000 writes a second."
- Thinking
- "Let me think for a moment." An announced pause is fine; a silent one looks stuck.
- Unsure
- "I have not run this in production, but here is how I would reason about it."
- Checking in
- "That covers the write path. Shall I go deeper here, or move on to reads?"
- Correcting
- "Actually, that breaks when a user is logged in on two phones. Let me fix it."
- Wrapping up
- "To sum up: the first bottleneck is database writes, the riskiest failure is losing the cache, and next I would add a second region."
- Avoid
- "A key-value store, because it is faster." A lookup by primary key in a relational database also takes about a millisecond; choose a key-value store for write scale or a simple partitioned data model.
- Avoid
- "We just use Kafka." A tool name is not a reason; name the problem it solves here.
- Avoid
- "It depends" on its own. Say what it depends on, then choose.
How the interviewer steers
The interviewer is not an audience: they nudge you towards the parts they want to see, and each kind of question tests something specific:
| They ask | They are checking | A good first move |
|---|---|---|
| "What happens if this server dies?" | Failure handling | Trace one request through the failure and name the recovery |
| "Traffic grows ten times. What breaks first?" | Bottleneck thinking | Redo the estimate and find the part that hits its limit first |
| "Why this database?" | Trade-offs | Tie it to the access pattern: what you read, how often, by which key |
| "Can a user see stale data?" | Consistency | Say where staleness can appear and whether the product tolerates it |
| "How would you know it is broken?" | Operations | Name two or three metrics and an alert |
Each is answered best with a traced request or a number, not a list of tools.
If the interviewer keeps returning to one component, that is the deep dive they want. Follow the hint instead of defending your first draft.
What strong answers do
Strong answers look alike whatever the product, and so do weak ones. The table is both a guide and the rubric for scoring a mock: score each row 0, 1 or 2, where 1 sits between the two columns.
| Area | Strong (2 points) | Weak (0 points) |
|---|---|---|
| Requirements | Asked 3 to 5 questions, wrote them down, named what is out of scope | Drew boxes in the first two minutes |
| Estimates | Stated assumptions; a number changed a decision | No numbers, or numbers never used |
| API and data model | Calls match the requirements; keys fit the main query | Tables chosen without the main query in mind |
| High-level design | Started with the smallest design and let numbers force each addition; read and write paths traced | The "final" architecture first, with boxes added "to be safe" |
| Deep dive | Two options compared, one chosen, its cost named | One option, as if it were the only one; a stack of tool names |
| Failures | Said what happens when each part is slow or gone, and how it recovers | Only the happy path |
| Operations | Named what to monitor and alert on, how changes roll out and back, and how data moves in a migration | Never said how the system is watched, shipped or changed |
| Communication | Talked while drawing; followed hints; when unsure, compared two options and picked one | Long silences; missed hints |
| Time | Reached the wrap-up by minute 37 of the design time | Ran out of time mid-design |
Aim for 14 or more out of 18 with no zeros. The lowest row matters more than the total: carry one fix into the next mock and score again. Notice what earns nothing: naming many technologies.
Part 3 · One Round, Minute by Minute
Minutes 0 to 8: scope and numbers
Here is one round from start to finish, on a prompt no chapter designs: "Design an online exam. A university runs its entrance test for 1 lakh (100,000) students at once: 2 hours, 100 multiple-choice questions." Try the first 8 minutes yourself before reading on.
0–5 · Requirements. "Students log in, get the paper at 10:00, save answers as they go and are scored after the exam closes; teachers upload papers in advance. Out of scope: proctoring video, question writing and payments. What matters most is that no saved answer is ever lost, and that everyone starts at 10:00 sharp. Is the question order shuffled per student? Can a student resume after a dropped connection?" The interviewer says yes to both.
5–8 · Estimates. "1 lakh students open the paper within about 2 minutes: roughly 830 requests a second, call it 1,000. Each saves 100 answers, say 150 with changes, so 1.5 crore (15 million) saves over 7,200 seconds, about 2,000 a second. One relational database can take that. And at 12:00 the clock runs out for everyone at the same moment."
Each number the candidate kept changes a choice: the start rush shapes how the paper is delivered, 2,000 saves a second means one database is enough, and the 12:00 cliff is designed away in the deep dive. Estimate only what decides something.
Minutes 8 to 22: API, data and the design
8–13 · API and data model. "Four calls. GET /exams/{id}/paper returns the encrypted paper. GET /exams/{id}/key answers only from 10:00. PUT /attempts/{id}/answers takes a batch of answers, each with a sequence number. GET /attempts/{id} returns saved answers and the deadline, for resuming. Two main tables: attempts, with the student, deadline and status, and answers, keyed by attempt id and question number, because the main query is all answers for one attempt."
13–22 · High-level design. "The paper is encrypted and pushed to a CDN. Phones download it in the 20 minutes before the start, so at 10:00 they fetch only a small key. Answers go through a load balancer to stateless exam servers, four to six across two zones at about 1,000 requests a second each, then into one relational database with a synchronous replica in the second zone. After 12:00, a batch job scores every attempt."
Notice what is missing: no cache and no queue, because no number so far needs them. Every box on the board answers a requirement or an estimate from the first 8 minutes.
Minutes 22 to 40: deep dive, probes and wrap-up
22–37 · Deep dive. The interviewer picks "never lose an answer". "Each answer is written to the phone first, then sent with a sequence number. The database keeps an answer only if its sequence is newer than the stored one, a conditional update, so retries and late arrivals cannot overwrite a newer choice. The phone shows 'saved' only after the server confirms. The server's clock closes the exam: whatever is saved at 12:00, plus a 60-second grace window for answers in flight, counts. Nobody has to press submit, so the 12:00 cliff disappears."
Probe at minute 27: "A student's Wi-Fi drops for 3 minutes. What happens to their answers and their time?"
- Answers stay on the phone and go out in order, with their sequence numbers, when the connection returns, so nothing is lost and nothing old overwrites something new.
- The deadline lives on the server, so going offline gains no time. Answers that arrive after the grace window go to a review list instead of being dropped silently.
Probe at minute 33: "What if it is 10 lakh students?"
- The start becomes 10 lakh small key requests, about 10,000 a second, which the CDN absorbs; the paper itself was downloaded earlier.
- Saves grow to about 20,000 a second, too many for one comfortable primary, so shard answers by attempt id across 4 to 8 databases. No query needs two attempts at once.
- Exam servers scale out behind the load balancer: about 30 with headroom.
37–40 · Wrap-up. "To sum up: the paper is preloaded and unlocked by a small key, answers are saved on the phone and in a replicated database with sequence numbers, and the server's clock closes the exam. At 10× the first bottleneck is the answers database, which shards by attempt id. The riskiest failure is losing its primary: the replica in the other zone takes over within a minute, while phones keep answers and retry with jitter. Next I would add proctoring and result publishing."
What the candidate skipped matters as much: no storage maths for five years, no list of tools, and no second deep dive started at minute 36.
Part 4 · Practise
Six weeks, 45 minutes a day
The recommended path through the course takes six weeks at about 45 minutes a day: every chapter in order, one product per weekday, and timed practice every weekend. If you are just starting, read this chapter now, then come back to it before your first mock.
| Week | Weekdays: read | Weekend: practise |
|---|---|---|
| 1 | The four foundation chapters, then DNS and Load Balancers | Requirements and estimates only, 10 minutes each: a cricket score app, an exam results site, a food delivery tracker |
| 2 | Databases to Distributed Caches | A first full round, alone and recorded: a live poll for a TV talent show |
| 3 | Message Queues to Sharded Counters, then Design a Link Shortener | Two scored rounds: a quiz leaderboard and a coupon system for a festival sale |
| 4 | Products: video streaming, Q&A site, maps, nearby places, ride sharing | Redraw two products from memory, then change one requirement and adapt |
| 5 | Products: microblog, news feed, photo sharing, group chat, web crawler | Partner mocks on two of the mock prompts in this chapter |
| 6 | Products: typeahead, collaborative docs, notifications, ticket booking, payments | Lessons from Real Outages, then partner mocks on the remaining prompts and a redo of your weakest |
Before each product chapter, attempt its brief for 15 minutes; afterwards, list what you missed and answer its drill questions aloud. Reading builds knowledge, but timed rounds build the skill. If you fall behind, move a chapter to the weekend or stretch the plan, but never drop the weekend round.
Run a mock like the real round
A mock helps only if it feels real: a prompt you have not prepared, a clock, and someone asking "why?". Take turns with a partner preparing for the same interviews.
- 1The interviewer picks the promptone you have not prepared; for a course prompt, they read its chapter first
- 2Set up as on the dayvideo call, shared whiteboard, 5 minutes of introductions, then a 40-minute design timer
- 3The interviewer stays in rolebrief answers, two or three probes from 'How the interviewer steers' in the deep dive, otherwise quiet
- 4Stop when the 40 minutes endeven mid-sentence; the clock is part of the test
- 5Feedback, then the scoretheir two strengths and two fixes, then a score for each row of 'What strong answers do'
Run it alone: speak aloud, record yourself, and at minutes 27 and 33 ask yourself one of the five probes. Score the recording within a day.
Mock prompts
Five prompts that no chapter designs for you. Open the points only after your mock: each lists three things a strong answer must hit, and the chapters it draws on.
A metro card top-up service
- Top-ups are idempotent: one key per payment, so a retried callback never credits twice.
- Balances come from a ledger of top-ups and taps, not a number edited in place.
- Gates cannot wait on the network at rush hour: they decide locally and sync taps later.
- Draws on: Design a Payment System; Message Queues.
A train running-status app
- Thousands of trains report, millions of people check: cache each train's status for a few seconds.
- Position reports go through a queue to a service that works out the delay at each station.
- A popular train on a festival weekend is a hot key: serve its page from the CDN.
- Draws on: Distributed Caches; Message Queues; Content Delivery Networks.
A bill-splitting app for friends
- Expenses are ledger entries; balances are computed from them, never edited directly.
- Money is stored in whole paise, and a version number on each expense stops two edits overwriting each other.
- Settling up pairs people who owe with people who are owed: at most n − 1 payments for n friends.
- Draws on: Design a Payment System; Databases: Replication, Partitioning and Choosing a Store.
A notes-sharing app where students upload PDFs
- Uploads go straight to a blob store through signed URLs; the API stores only metadata.
- Downloads go through a CDN: the night before an exam, a few files get most of the traffic.
- A search index covers subject and title, and files are scanned for malware before anyone can download them.
- Draws on: Blob Stores; Content Delivery Networks; Distributed Search.
Live comments during a cricket final
- Viewers hold WebSocket connections; each comment fans out to every connection server through pub-sub.
- Nobody can read 20,000 comments a second, so each viewer gets a sample of a few per second.
- Rate-limit each user and filter abuse before fan-out, not after.
- Draws on: Design a Group Chat App; Publish-Subscribe; Rate Limiters.
Mistakes in preparation
Inside the round, the table in "What strong answers do" is your guide. Outside it, preparation goes wrong in a few predictable ways:
| Mistake | Do this instead |
|---|---|
| Reading without ever timing yourself | Time every attempt from week 1, even the drills |
| Practising only the prompts you like | Let a partner or a random pick choose the prompt |
| Memorising a chapter's final diagram | Redraw from the requirements, then change one and adapt: interviewers change a requirement to see whether you can |
| Practising in silence | Speak every attempt aloud: talking while you think is a skill of its own |
| Cramming new topics the night before | Do one estimate and one redraw from memory, then sleep |
If your mocks never reach the wrap-up, move the last alarm from minute 37 to 35 until they do, then move it back.
After the course
Depth comes from real systems and repetition. After the course, keep one of these going each week for a few months.
- Build a small version. Put a cache in front of a toy link shortener, load-test it, and find what breaks first.
- Read postmortems. Match each published incident report to a pattern in Lessons from Real Outages.
- Read the docs of tools you name. Learn how each database or queue you mention replicates and what it guarantees.
- Study the systems around you. Ask how your team's service survives a traffic spike or a dead database, and draw it.
- Teach it. Explain a building block to a friend in five minutes, or play the interviewer in their mock.
Wrap-up
That is the end of the course. Your next step is a timed round: pick a mock prompt, set the alarms and start. When a step feels shaky, go back to its chapter, starting with What System Design Is: From One Server to Millions.
Part 5 · Check yourself
Quick check
Q1In a mock on a cricket score app, you are still estimating at minute 10: five years of storage, bandwidth and server counts. What went wrong, and how do you get back on the clock?
Think it through, then check.
- Minutes 5 to 8 are for numbers that change a decision: here, peak score requests a second during a final, which decides caching or push. Five years of scores fit on one disk.
- Recover: keep that one number, spend about 3 minutes on the API and tables, and start drawing by minute 15 so the deep dive keeps most of its time.
Q2The prompt is 'Design an OTP service for a bank's app.' You have five minutes for requirements. Which three questions do you ask first, and what does each answer change?
Think it through, then check.
- How many OTPs a day, and at what peak, such as salary day? That sets the scale and the SMS capacity to buy.
- What must never happen? An OTP accepted twice or after expiry: that makes one-time use, an expiry of a few minutes and an attempt limit the core.
- Which channels, and how fast? SMS within about 10 seconds with a backup provider means a queue per channel and provider failover.
Q3In the online exam design, a student on a train changes question 12 from B to C. The save for C arrives first; the save for B arrives a minute later, after a reconnect. What does each part do, and what counts?
Think it through, then check.
- The phone stamps every save with an increasing sequence number: B got 7 and C got 8.
- The database keeps an answer only if its sequence number is newer than the stored one, so C (8) stays and the late B (7) is ignored.
- The phone showed 'saved' for C only after the server confirmed it, so what the student last saw is what counts.
Q4Your last two mocks scored 0 on operations because the probe "How would you know it is broken?" found you with no answer. What do you change?
Think it through, then check.
- Add an operations pass before the wrap-up: two or three metrics with alerts, such as error rate, p99 latency and queue depth (Monitoring: Metrics, Logs, Traces and Alerts).
- Say how a change ships and rolls back: a 1% canary, then one region at a time (Lessons from Real Outages).
- In solo mocks, ask yourself that probe at minute 33.
Q5The recruiter says your next round is 90 minutes in your own editor: "build a parking system for a mall, with entry, exit and fees." How should your preparation differ from this course?
Think it through, then check.
- This is machine coding: the result is working, tested code, not boxes and numbers.
- Practise timed builds: classes for floors, spots, tickets and fees, a few commands, and tests for edge cases such as a full floor.
- Keep what transfers: clarify requirements first, sketch the data model and states before coding, and cut scope so you finish.