How an interview runs
What an interview is for
Section titled “What an interview is for”A system design interview gives you a short, vague sentence, such as “design a URL shortener”, and some time. Nobody expects a finished system in 45 minutes. What you produce is a sequence of decisions made out loud, and the person across the table can judge only what you say. A good idea that you did not state does not exist for them, and neither does a step you skipped.
Mental model. An interview is a design review that you run alone, out loud, on a clock. The design matters, and so does the order in which you reach it: a listener who sees the requirements, then the numbers, then a simple design, then the first limit, can follow every choice you make after that.
Google’s SRE Workbook describes the same habit for real work and calls it Non-Abstract Large System Design. You start from the problem statement, gather requirements, and iterate through designs that grow more sophisticated, each one examined for its strengths and weaknesses. It asks of each design whether it is possible, whether it can be better, whether it is feasible at the scale required, and whether it is resilient. It also says that “examples of sound reasoning and assumption making are more important than any final values”. That is the attitude of this module: the figures are there to show your reasoning, and a wrong assumption that you stated can be corrected in one sentence.
This is the course’s own model of an interview, built to be practised. It is not the rubric of any company, and no company is quoted here.
The ten steps
Section titled “The ten steps”Follow these in order. Each one gives the next something to stand on.
- Clarify. Ask what the system is for, who uses it and what is in scope, and say it back in one sentence. Do this before you draw anything.
- Requirements. Separate what the system does from how well it must do it, and turn “fast” and “reliable” into numbers you can test. The requirements lesson shows how.
- Estimate. Turn users and actions into requests per second, storage and bandwidth, and say which of the three the design is built around.
- Simple architecture. Draw the simplest design that meets the requirements, and say what each box is for.
- Find the bottleneck. With the numbers from step 3, say which component runs out first, and at what load.
- Scale. Make one change that removes that limit, say what it costs, and look for the next limit. Repeat.
- Handle failures. Name what can fail, what the system does when it does, and what the defence costs.
- Choose consistency. Say which data must be right at once and which may be a moment late, and what the user sees in the second case.
- Discuss trade-offs. For each important choice, say what it buys, what it costs and when the other choice would be better.
- Defend the design. Answer the follow-ups, and change the design when you are given a new fact instead of defending the old one.
The case studies follow the same shape in their own way, and their last lesson has a checklist for it.
Where the 45 minutes go
Section titled “Where the 45 minutes go”The Arena runs these steps as eight stages, one box to write in each, with a suggested time. Steps 1 and 2 share the first stage, steps 5 and 6 share the scaling stage, and the failure step is split in two: one stage on how the design stays up, and one on a single failure worked through in numbers. Step 10, defending, happens in the follow-ups that come after every stage.
| Stage | Minutes | Steps it covers |
|---|---|---|
| Requirements | 5 | 1 Clarify, 2 Requirements |
| Estimation | 6 | 3 Estimate |
| Architecture | 10 | 4 Simple architecture |
| Scaling | 6 | 5 Find the bottleneck, 6 Scale |
| Consistency | 4 | 8 Choose consistency |
| Reliability | 4 | 7 Handle failures: what can fail and how the design stays up |
| Failure scenarios | 5 | 7 Handle failures: one failure, worked in numbers |
| Trade-offs | 5 | 9 Discuss trade-offs, and 10 Defend the design |
| Total | 45 |
Architecture gets the most time because it is where you draw, and because later stages lean on it. Consistency and reliability get four minutes each because the Arena asks for a short, focused answer in them, not because they matter less.
The Arena offers 30, 45 and 60 minutes. The suggested times scale in proportion: at 30 minutes each stage gets two thirds of its 45-minute share, and at 60 minutes four thirds. The clock runs for the whole interview and not per stage, so you may spend more than the suggestion on one stage and make it up elsewhere. The stage screen shows how much of its suggested time you have used.
Answer before you look
Section titled “Answer before you look”In the Arena you write your answer before anything else on the screen is allowed to help you. The strong answer, the rubric and the follow-ups appear only after you submit, and Submit answer unlocks only when you have written enough: most stages ask for at least 80 characters, and the architecture stage of the URL shortener asks for 100. This is on purpose. If you read a good answer first, everything it says will look obvious, and you will not find out which parts you could not have produced yourself.
The same rule applies to a follow-up: you write at least 20 characters before the guidance for it is shown. Each stage shows at most 2 follow-ups. Which ones you meet can depend on a choice you made: if you pick one database, the question is about that database.
The clock runs while you write and stops when you submit. Reading the review is not timed.
Try the habit once on a single question. The box below is the same idea in miniature: one question, your answer, then the strong answer. Write at least a paragraph before you look.
Interview question
Writing and reviewing an answer needs JavaScript.
The interviewer asks
Design a URL shortener: a user submits a long URL and gets a short link, and anyone who opens the short link is redirected to the long one. Walk through how you would build it and how it grows.
Assume 100 million new links a month, about 100 redirects for each link created, and links kept for 5 years.
Write your answer first. The strong answer unlocks once you have written a real attempt.
0 of 80 characters written to unlock the strong answer
Practice and strict
Section titled “Practice and strict”Before you start you choose a mode. Both use the same stages and the same scoring. They differ in what the clock does.
| Practice | Strict | |
|---|---|---|
| The clock | You can pause and resume it | It cannot be paused, and it keeps running if the browser tab is hidden |
| At zero | Time is only reported; you can keep going | The stage you are on is locked on what you have written, and the stages after it score zero |
| A locked stage | Not applicable | You can still read the review and score it, but there are no follow-ups |
| Use it for | Learning: taking a break, looking something up in a lesson, finishing a stage properly | Rehearsing the pressure, once you can finish a practice run in time |
Start with practice mode. A strict run you cannot finish teaches you mostly that you ran out of time, and a practice run teaches you which stage you spent it on. The summary shows the time you used in each stage next to the suggestion, so the answer is in the table.
You can also skip a stage, or end the interview early. A skipped stage scores zero, and ending early scores zero for the stage you are on and for the ones after it.
Scoring yourself honestly
Section titled “Scoring yourself honestly”Free text is never scored for you. Nothing in the browser can tell whether your paragraph on caching is good, so you score it yourself against the rubric, which is a short list of the points a strong answer makes. Tick a point only if your written answer makes it. A point that you had in your head and did not write does not count, for the same reason it would not count in an interview: nobody could hear it.
- A stage’s score is the rubric points you ticked plus the points of the follow-ups that you ticked, over the total number shown. The follow-up points count as zero until you have answered the follow-up.
- A stage below 60% of its points is marked weak. The summary then links the lessons that cover the topic of that stage, so that you know where to read next.
- The numbers you type in the estimation stage are checked against the model answer within a tolerance that is stated with each number (for the URL shortener it runs from 5% to 25%), and shown after you submit. They are information, and they do not change your score.
- If you sketch a design in the Architecture Builder, the Builder’s findings on it are shown next to the rubric as evidence. They do not change your score either. You decide whether your design made the points.
The risk of self-scoring is generosity. If you hesitate over a point, leave it unticked, and read the sentence in your answer that you think makes it. If you cannot find that sentence, you did not write it.
What happens if you skip the estimate
Section titled “What happens if you skip the estimate”Take the URL shortener of the case study: 100 million new links a month, about 100 redirects for each link, kept for 5 years. The arithmetic takes two minutes. 100 million a month is about 40 new links per second. At 100 redirects per link that is about 4,000 redirects per second on average, and with a peak of 2.5 times the average, about 10,000 requests per second. Over 5 years that is 6 billion links, and at about 500 bytes each, about 3 TB.
Now see what the numbers decide. A database that answers a lookup in 5 ms, 4 at a time, does 800 lookups per second, so the peak is 12.5 times what one database can do. That is the finding: reads, not storage, are the load, so the first move is a cache. A candidate who skipped the arithmetic has two ways to go wrong. They hear “6 billion” and shard the database, which is real work for 3 TB that fits on one machine. Or they build a single database and never discover that it is overloaded at 8% of the peak. The Arena lists the first among the common mistakes of this scenario, and the second is the same mistake in the other direction: designing before showing, with a number, where the simple design fails. Neither is a mistake of knowledge. Both are mistakes of order.
- An interview judges what you say, in the order you say it. The ten steps are clarify, requirements, estimate, simple architecture, find the bottleneck, scale, handle failures, choose consistency, discuss trade-offs and defend the design.
- The Arena turns them into eight stages with 5, 6, 10, 6, 4, 4, 5 and 5 minutes, 45 in all. At 30 minutes each share is two thirds, and at 60 minutes four thirds.
- You write before you look: the strong answer, the rubric and the follow-ups appear only after you submit, and a follow-up’s guidance only after at least 20 characters.
- Practice mode can be paused and never locks. Strict mode cannot be paused, locks the stage you are on at zero, and scores the rest zero.
- Score only what you wrote. A stage below 60% is weak, and the summary points to the lessons for it. Number checks and Builder findings are shown, and are not counted.
- Skipping the estimate hides the finding. For the URL shortener, about 10,000 requests per second against 800 per database says the load is reads, and it takes two minutes to work out.
Next: Estimating out loud, the numbers an interview wants and how to say them.
Your progress
Built by GhaziAlibi.
© ShardCraft. All rights reserved.