Day 7: Defend your design in a 45-minute interview
Run the whole system with an end-to-end check, write your one-page design, and practise the interview questions with your own measured numbers.
You have built a system most candidates only draw: a product API with a cache, a rate limiter, sharded and replicated order databases, and a work queue — and you have measured every one of them. This lesson turns that into interview performance. You run the whole system with a single end-to-end check, write a one-page design, and practise the questions interviewers actually ask, answering with your numbers instead of slogans.
Run the whole system
start.sh starts everything: Redis, 20,000 orders of history across three sharded leaders, replica.py shipping changelogs to followers, a receipt worker, and the app. Then it runs system_check.py, which checks each pattern end to end:
Read one line closely: the receipt was sent 1.6 seconds after checkout. That isn't a bug; the rate-limiter check placed five orders just before, and one worker sends a receipt every 300 ms, so this receipt waited its turn. That's what "eventually" means in "eventually consistent", measured. If an interviewer asks "how long until the customer gets the email?", the answer is "queue depth × 300 ms ÷ workers".
The one-page design
Your project now contains DESIGN.md: requirements, an architecture sketch, a table of before/after numbers, and the trade-offs you chose. Here are the numbers you measured in lessons 1–6:
Edit DESIGN.md until you can say every line of it without reading.
How a 45-minute interview runs
Requirements (0–5 min). Ask before you draw. Who uses it, how much, what's the read:write ratio, what must never go wrong (overselling, losing orders), what latency is acceptable. Write the answers down where the interviewer can see them.
Estimates (5–10 min). Rough numbers that decide the design. 10 million daily users × 20 page views ÷ 86,400 s ≈ 2,300 page views per second on average, perhaps 10× at peak. You know one Python process with a cache served about 5,000 per second on 2 cores; you know one without a cache served 300. That tells you the cache isn't optional.
High-level design (10–20 min). Draw the boxes, then walk one request through them end to end: "A shopper opens product 7…"
Deep dives (20–35 min). The interviewer picks one or two boxes. This is where building it pays off — you know how the thundering herd happens and how the lock prevents it.
Failures and trade-offs (35–42 min). What breaks, and what you gave up.
Wrap-up (42–45 min). Summarise and say what you'd do next with more time.
Read the full lesson free
This lesson is one of the first 3 in its course, free with an account — the full article, implementation guide and scripts. No card needed.
Already a member? Sign in