Skip to content
Theory · How the interview runs · lesson 2 of 6

45 minutes, step by step

In the previous lesson you drew your first diagram in five minutes. In an interview the diagram appears too, but not at once: two steps come first, and without them there is nothing to build it from.

Think of a driving test. The examiner watches more than whether you reached the destination. They notice whether you checked the mirrors and fastened the seat belt before moving off. Whoever hits the gas at once loses points, even after a ride with no accident.

In an interview the mirrors are the requirements and the numbers. The comparison has a limit: the examiner sets the route of the test, while you keep the order of the interview yourself. The interviewer usually does not remind you that it is time for the next step.

Four steps

The 45 minutes split into four steps:

  1. Requirements — 5 minutes.
  2. Load estimates — 5 minutes.
  3. Design — 20 minutes.
  4. Deep dives — 15 minutes.

The diagram appears only at the third step, 10 minutes in. The first two steps give it a footing: without them every block on the diagram is a guess.

A couple more minutes usually go to introductions at the start and to your questions at the end. They come out of the deep dives, so watch the time from the first minute.

Requirements

You find out what the service does and how well it must work. Ask about the main scenarios, the number of users, the acceptable latency and availability. Ask separately what stays out of scope.

Write down every answer. In 15 minutes you will rely on these numbers, and asking again would be awkward.

Load estimates

From the answers you work out three things on paper:

  • how many requests a second come in for writes and for reads;
  • how much data piles up over a few years;
  • how many times reads outnumber writes.

Precision to the percent is not needed here. The order of magnitude matters: 40 requests a second and 40,000 are different systems.

Design

First briefly describe the API — the service's main calls — and the data model: which tables or entities are stored and by which key they are looked up. Then draw the diagram step by step: from the simplest request path to the blocks the numbers call for. Name each new block out loud together with its reason.

Deep dives

The interviewer picks one or two parts of the diagram and asks deeper. What happens if the database fails? How do you not lose an event? What breaks when the load grows tenfold? Here you also name the trade-offs: what you gained and what you paid for it.

A diagram before the questions

Here is what happens when the first two steps are skipped. A candidate hears "a notes service" and in a minute draws a cache and a queue — "that is how big systems do it". Then the interviewer names the numbers, and half the diagram turns out to be useless.

Find the blocks on this diagram that the numbers do not justify, and remove them.

Sketch

A candidate drew a notes service without asking a single question. Then the interviewer answered: about 1,000 notes a day, each opened about three times, and the user sees a saved note right away. Remove what these numbers do not justify.

A cache and a queue are needed in many systems, but each of them appears for a specific load. Without numbers you can neither place them nor explain them.

When time runs short

Sometimes by minute 25 the diagram is still not ready. Do not keep quiet about it: say that you will simplify one part and come back to it if time allows. The interviewer values a candidate who keeps the plan on their own.

If the interviewer leads the talk into one topic, follow them. They are showing what they want to check, and your plan should adjust to it.

Common mistake

Getting stuck on the requirements. A candidate asks twenty questions in a row and after 15 minutes has not drawn a single block. Questions matter, but five minutes means the five to seven main ones. If there is no answer, name your assumption out loud and move on: "I'll assume 1,000 notes a day."

Key points

  • 45 minutes: requirements 5, estimates 5, design 20, deep dives 15.
  • The diagram appears only at the third step, after the requirements and the numbers.
  • Every block of the diagram rests on a requirement or a number, or it cannot be explained.