Interview prep · 9 min read

How to approach a system design interview

A four-step plan for the 45 minutes: scope the problem, sketch a high-level design, go deep where it matters and wrap up, with the estimation and availability numbers you need on the way.

A system design interview is a conversation, not a quiz. There is rarely one right answer; the interviewer wants to see how you turn a vague request ("design a URL shortener") into a concrete system, which trade-offs you notice, and whether you can defend your choices with numbers. This guide gives you a plan for the usual 45 to 60 minutes and the handful of numbers you need along the way. Every problem on the roadmap is practice for exactly this plan.

The four steps #

Most good interviews follow the same arc. Keep an eye on the clock: the times below are for a 45-minute slot; stretch them in proportion for longer ones.

StepTimeWhat you produce
1. Scope and requirements5–8 minUse cases, scale, the numbers that matter, what is out of scope
2. High-level design10–15 minBoxes and arrows for every use case, end to end
3. Deep dive15–20 minOne or two components examined closely: data model, scaling, failures
4. Wrap-up3–5 minBottlenecks, trade-offs, what you would do next

The most common failure is not a wrong design. It is spending 30 minutes on one component and never showing a complete system. Get something end to end on the board first, then improve it.

Step 1: scope and requirements #

Start by asking questions, and write the answers down where both of you can see them. You are looking for two lists.

Functional requirements are what the system does: the use cases. Name them precisely ("a user posts a message", "a follower reads their feed") and agree on which ones are in scope. Three or four is plenty for an interview; saying "search and moderation are out of scope for now" is a sign of judgement, not of weakness.

Non-functional requirements are how well it must do it:

If the interviewer has no numbers, propose some and say they are assumptions. Numbers you chose are far better than no numbers at all.

Step 2: high-level design #

Draw the system for every use case, end to end, before optimising anything: the client, the entry point (a load balancer or API gateway), the services, and the data stores. Walk each use case through the diagram out loud: "the client sends a POST to the API, the API inserts the row, then answers 201".

Keep services stateless where you can, so any replica can serve any request and you can scale them by adding copies. Put state in stores chosen for their access pattern: a key-value store for lookups by key, a relational database for transactions and flexible queries, object storage for large blobs, a queue for work that can happen later.

At the end of this step you should be able to point at every requirement and say which part of the diagram meets it, even if roughly.

Step 3: deep dive #

Now go deep on the parts that decide whether the design works. The interviewer will often pick one; if not, choose the component under the most pressure from your numbers. Typical deep dives:

For every choice, name the alternative and why you rejected it. "I chose a queue here rather than a synchronous call because the email provider is slow and occasionally down, and the user does not need to wait for the email" is the kind of sentence interviewers remember.

Step 4: wrap-up #

Finish by stepping back. Name the bottleneck you would hit first at ten times the traffic, the trade-offs you accepted (staleness for speed, cost for availability), and what you would add with more time: monitoring and alerting, rate limiting, a second region. A calm, honest summary of the design's limits is worth more than a last-minute feature.

Back-of-the-envelope estimation #

Estimation is not about precision. It is about knowing whether a number is a thousand or a million, because that decides whether one machine is enough or you need fifty. A few habits make it quick:

The tables below are the essentials; Numbers to know has the full cheat sheet (latency, throughput per server, sizes, cloud prices) and a fully worked estimate.

Powers of two and ten that come up all the time:

UnitRoughly
1 KBa short JSON document or database row
1 MBa photo, a long article with images
1 GBfits comfortably in one machine's memory
1 TBfits on one machine's disk; a big but ordinary database
1 PBneeds a distributed storage system

Latency numbers worth knowing #

You do not need exact figures, but you should know the order of magnitude of the common operations. They explain why caches exist and why cross-region calls hurt.

OperationOrder of magnitude
Read from main memory~100 ns
Read 1 MB sequentially from memory~10 µs
Round trip inside a data centre~0.5 ms
Read from an in-memory cache over the network~1 ms
Simple indexed database querya few ms
Read 1 MB from an SSD~1 ms
Round trip between continents~100–150 ms

The lesson: memory is thousands of times faster than a network round trip, and a network round trip inside one data centre is hundreds of times faster than one across an ocean. Designs that keep the hot path in memory and in one region are fast; designs that cross regions on every request are not.

Availability in nines #

Availability is the share of time a system works. Each extra nine divides the allowed downtime by ten.

AvailabilityDowntime per yearDowntime per month
99% ("two nines")~3.65 days~7.3 hours
99.9%~8.8 hours~44 minutes
99.95%~4.4 hours~22 minutes
99.99%~53 minutes~4.4 minutes
99.999%~5 minutes~26 seconds

Two rules let you reason about availability on a whiteboard:

How Proschi maps to the interview #

Every practice problem is the interview, written down. The statement is the interviewer's prompt after step 1: the use cases, the scale and the constraints are already agreed. Your design is steps 2 and 3. The tests are the follow-up questions an interviewer would ask.

The numbers are deliberately simple teaching values, right to an order of magnitude. They are meant to tell a sound design from a broken one, not to replace a load test; How the simulation works lists every formula and default.

Each step of the roadmap starts with a lesson that explains the concepts behind its problem, then the challenge, then the review of your design. Read the lesson, try the problem without the hints, and only then compare with the reference solution. The struggle is where the learning happens.

Further reading #

Go to the roadmap