System design interview framework: a 45-minute answer template
A system design interview framework is a fixed order of steps you follow on every question. Ours has five: requirements (about 5 minutes), actors and lifecycle (6), numbers (6), high-level design (12) and deep dive with trade-offs (14). That leaves a minute or two to sum up. Below is what to say and write in each one.
By devskills editorial team · Last updated
Why use a fixed template at all?
The question you get is short and vague on purpose. "Design a URL shortener." With no plan, most people do one of two things. They draw boxes before they know what the system must do, or they spend twenty minutes on requirements and never reach the design. A template removes the decision about what to do next, so all your attention goes on the problem.
This page is the working template: the minutes, the board layout and the sentences to use at each checkpoint. If you want the reasoning behind each stage first, read the five stages and how the interview works. Both are short.
What does the 45-minute budget look like?
These are targets. A budget helps you notice when you are over it. Write the clock times at the top of the page before you start. If the round started at 10:00, your checkpoints are 10:05, 10:11, 10:17, 10:29 and 10:43.
| Stage | Minutes | Ends at | What you have on the board by the end |
|---|---|---|---|
| 1. Requirements | ~5 | 0:05 | Three to five lines of scope, and the one or two questions you asked |
| 2. Actors and lifecycle | ~6 | 0:11 | Who touches the system, and the main object as a chain of states with failure branches |
| 3. Numbers | ~6 | 0:17 | Requests per second, storage, and one sentence: "so the hard part is ___" |
| 4. High-level design | ~12 | 0:29 | Boxes and arrows, each one traceable to a requirement or a number |
| 5. Deep dive and trade-offs | ~14 | 0:43 | Two hard parts worked through, each decision with its cost written next to it |
| Wrap-up | ~2 | 0:45 | A 30-second summary and what you would do next with more time |
What do you say in the first five minutes?
Start with assumptions, said out loud, so the interviewer can correct them. Then ask only the questions whose answers would change a box on the board. Then propose the scope yourself instead of waiting to be given one.
A useful test for each question you want to ask: if the answer were the opposite, would you draw something different? "Do links expire?" changes the storage and the clean-up job, so ask it. "What colour is the button?" changes nothing, so skip it.
Write the scope as a short list on one side of the board. You will point back at it in stage 4 when you explain why a box exists.
- Say it like this: "I will assume about 100 million new links a month, reads far more common than writes, and links that never change once made. Two questions: do links expire, and do we need custom aliases?"
- Then close the stage: "So in scope: create, redirect, optional expiry. Out of scope: analytics and accounts. Is that fair?"
What goes in the actors and lifecycle step?
List everyone and everything that acts on the system. Include the system itself, because the jobs it runs on its own (expiring things, retrying, cleaning up) are often where the interesting design is.
Then write the life of the main object as a chain of states. For a short link that might be: requested, created, active, expired, deleted. Now ask two questions at each arrow. What if this step never finishes? What if one side gives up here? The answers become the failure branches, and most of your stage 5 material comes from them.
This step takes six minutes and it is the one people skip most. Skipping it is why so many designs only work when nothing goes wrong.
How much maths is enough in the numbers step?
Enough to find out which part is hard. Use round figures and say them as you go. With the assumption above: 100 million writes a month is roughly 40 a second, because a month has about 2.6 million seconds. If reads are a hundred times writes, that is about 4,000 reads a second. At around 500 bytes a link, five years of links is about 3 TB.
Those are this page's example assumptions, not real traffic figures. What matters is the sentence that follows them: "So writes are easy, reads need a cache, and storage fits on a few machines. The hard part is making redirects fast and generating short codes that never collide."
If you need a refresher on the arithmetic, back-of-the-envelope estimation and the latency numbers page cover it. The cheat sheet has the figures on one page.
How do you draw the high-level design without over-building?
Draw the path of one request first, left to right: client, the service that receives it, where the data is read or written. Then add a box only when a requirement or a number asks for it. When you add one, say which. "The 4,000 reads a second are why there is a cache here."
Name the API and the main table in a line or two each. You do not need every column. You do need the key you will look things up by, because that choice drives the storage and partitioning questions that come next.
Stop at twelve minutes even if the picture feels thin. A small design you can defend scores better than a big one you have to explain away.
How do you choose what to deep dive into?
Go back to the sentence from stage 3, "the hard part is ___", and to the failure branches from stage 2. Pick the two that would hurt users most if you got them wrong. Tell the interviewer which two you picked and why, then ask if they would prefer a different one. Many will steer you, and that is useful information.
For each one, give at least two options, choose one, and write its cost next to it on the board. A cost is something specific you give up: more storage, a slower write, a short window where two users see different data. "It is more complex" is too vague to count.
Expect interruptions here. When they come, answer in one or two sentences, say what it changes in your design, and carry on. The follow-up drills practise exactly this.
What do you do when you fall behind?
You will, at some point. Check the clock at each stage boundary. If you are more than three minutes over, say so and make a cut out loud: "I am running long, so I will sketch the write path quickly and spend the deep dive on the cache." Saying it shows you are managing the time, which interviewers notice.
Cut from stages 4 and 5 first. Never skip stage 1, because every later minute depends on it. If you have to compress stage 3, keep the one sentence about the hard part and drop the storage maths.
If you finish early, do not fill the time with more boxes. Pick a third failure case and walk through it, or ask the interviewer what they would like to see in more depth.
How should you lay out the whiteboard?
Use the same layout every time so you do not think about it. One option that works on a whiteboard or a shared doc:
- Top left: scope and assumptions from stage 1.
- Below it: actors, and the lifecycle chain with its failure branches.
- Top right: the numbers, and the "hard part" sentence underlined.
- Centre, taking the most space: the high-level diagram.
- Bottom: a running list of decisions, each with its cost. This is what you read out in the wrap-up.
What does a good wrap-up sound like?
Thirty seconds. Restate the scope, the hard part, the two decisions you made about it and what each cost. Then one sentence on what you would do next: "With more time I would look at abuse, because anyone can create links."
That last sentence matters because it shows you know the design is unfinished and you know where. It also hands the interviewer an easy next question if there is time left.
How do you make the template automatic?
Using a template under a clock, while someone interrupts, takes repetition. Three ways to practise it here:
- Daily rep: 15 minutes on stages 1 and 2 only, which are the stages people rush.
- Timed mock: all five stages with a timer per phase and a follow-up question at the end.
- Any of the practice problems: write your own answer stage by stage, then compare it with the worked solution.
- Five stages in a fixed order: requirements, lifecycle, numbers, design, trade-offs.
- Budget roughly 5, 6, 6, 12 and 14 minutes, plus a short wrap-up. Write the clock times down.
- Every box in the design should point back to a requirement or a number.
- When behind, cut from the design and deep dive. Never from requirements.