Reference · gazar.dev ← From Senior to Staff

The method · system design interview

The system design interview framework.

The whole method on one page: how to run the hour and the seven steps, requirements, estimation, API, data, high-level design, deep dives, trade-offs. This is the umbrella the eight worked designs all apply, and the spine the whole course teaches. Bring it to any "design X" prompt.

01

How to run the hour

The same seven steps every time, in order, with a rough time budget so you reach trade-offs (the part that scores) before the clock runs out. Drive it; do not wait to be led.

#StepOutput~ time
1Requirements & scopefunctional + non-functional, explicit out-of-scope5 min
2Estimationthe one number that bounds the design5 min
3APIthe handful of endpoints5 min
4Data & storesentities + store choice from access patterns7 min
5High-level designboxes and data flow8 min
6Deep divesthe 2 to 3 hard parts, in detail15 min
7Trade-offsdecisions named along the axes5 min

The one-line meta-rule

Spend the first ten minutes narrowing (requirements + the bounding number), the middle on the spine (API, data, diagram), and the back half on the 1 to 3 things that are actually hard (deep dives) and the trade-offs. Most candidates over-build the easy parts and never reach the hard ones; you do the opposite.

02

Step 1 · Requirements & scope

Never start drawing. First, bound the problem: what it must do, what shape it must be, and just as importantly, what it does not do.

F

Functional

The few verbs that carry the product. For a feed: post, follow, read the timeline. Cut to the spine and say the rest is out of scope.

N

Non-functional (NFRs)

The shape: read vs write ratio, latency target, consistency, availability, scale. These drive the architecture more than the feature list does.

The move that scores immediately

Ask 2 to 3 sharp clarifying questions, then state your scope and assumptions out loud: "I will design the home timeline, read-heavy, eventual consistency is fine, hundreds of millions of users; search and DMs are out of scope." That one sentence shows you scope under ambiguity, which is half of what is being tested. Maps to S2.

03

Step 2 · Estimation

Find the single number that decides the architecture, before you draw anything. It is rarely raw QPS; it is the asymmetry that forces a structure.

useful back-of-envelope anchors
  seconds/day ~ 86,400 ~ 10^5
  1M req/day  ~ 12 req/sec        |  1B req/day ~ 12k req/sec
  read:write ratio                |  peak ~ 2 to 10x average
  storage = item_size * items     |  fan-out = followers per write

ask: what is the ONE number that shapes this design?
  Twitter -> fan-out amplification (1 tweet = N timeline writes)
  Uber    -> location writes/sec (a firehose of ephemeral updates)
  YouTube -> egress bandwidth (serving, not requests)
  Stripe  -> the error budget is zero (correctness, not QPS)
04

Step 3 · API

Name the handful of endpoints that carry the product, not every route. The API makes the requirements concrete and sets up the data model.

just the spine, e.g. a feed:
  POST /tweets            create (idempotency key)
  POST /follows           follow
  GET  /timeline?cursor=  read (cursor pagination, hydrated)

good instincts to show:
  - idempotency key on non-idempotent writes (safe retry)
  - cursor pagination, not offset (stable, fast at depth)
  - one round trip: return hydrated objects, not ids to re-fetch

The signal

A clean, minimal contract that shows API instincts (idempotency, pagination, one round trip) without bikeshedding field names. Three or four endpoints is plenty. Maps to S5 and the API cheat sheet.

05

Step 4 · Data & stores

List the core entities, then pick a store for each from its access pattern, not from habit. This is where read/write shape becomes a concrete decision.

Access patternReach for
Relational, transactional, joinsRelational (Postgres)
Huge, immutable, point lookups by keyWide-column / KV (Cassandra, Dynamo)
Hot, ephemeral, fast readsIn-memory (Redis)
Large blobs (media, files)Object storage + CDN
Full-text / ranked retrievalInverted index (search engine)

The move

Say the access pattern, then the store, then the justification: "timelines are hot and disposable, so Redis; tweets are immutable and huge, so a sharded KV." Picking a store from the access pattern is the whole skill. Maps to S3, S4, and the data-stores cheat sheet.

06

Step 5 · High-level design

Now the boxes and arrows: client, load balancer, services, stores, caches, queues, and the data flow between them. Keep it legible; this is the map you will deep-dive into.

client -> CDN / LB -> service(s) -> cache -> database
                          |  \-> queue -> workers (async)
                          \-> other services

draw the two paths that matter most, usually:
  WRITE path (often async, fan-out, persistence)
  READ  path (often cached, must be fast)
separate them on the board; it makes the design legible and
sets up the deep dives.

The signal

A clear diagram with the right primitives (LB, cache, queue, store) and a sensible data flow, drawn so the hard parts are visible. Do not over-decorate; a legible monolith-to-services sketch beats a maze. Maps to S7.

07

Step 6 · Deep dives (where you win)

Pick the 1 to 3 genuinely hard parts and go deep. This is the bulk of the score: it is where senior judgement shows. The interviewer often steers you here, so leave time.

If the design has…The likely deep dive
A feed / fan-outfan-out on write vs read, the celebrity hot key
Realtime deliverypersistent connections, ordering, delivery semantics
Money / inventoryidempotency, atomic claims, exactly-once, no double-spend
Huge readscaching, CDN, the long tail and hot keys
Failure exposureblast radius, fail-open vs fail-closed, degradation
08

Step 7 · Trade-offs (the six axes)

Close by naming the decisions you made along the core axes, and the least-wrong call for each. This is the single highest-signal thing you do.

AxisThe question to answer out loud
Consistency vs availabilitycan this read be stale, or must it be exact?
Latency vs costwhat do you precompute / cache to be fast?
Read vs write optimisationwhich side dominates, and did you optimise it?
Space vs timewhat do you store redundantly to save compute?
Simplicity vs capabilitywhat did you ship simple and defer?
Coupling vs cohesionwhat did you decouple (a queue, a boundary) and why?

The closing move

For each major decision, state the trade it bought in a sentence: "I chose availability and eventual consistency, because a timeline a few seconds stale is fine but it must stay up." Naming the trade, not claiming a perfect design, is what a staff engineer does. Maps to S1 and S12.

09

What actually scores (and what sinks you)

The interviewer is grading a few specific behaviours. Aim at these directly.

What scores

  • Driving the structure without being led.
  • Scoping under ambiguity and stating assumptions.
  • Numbers behind decisions ("the deciding number is...").
  • Depth on the hard parts, not breadth on the easy ones.
  • Trade-offs named out loud, with the least-wrong call.
  • Thinking aloud so the interviewer sees the reasoning.

What sinks you

  • Drawing before clarifying scope.
  • A memorized diagram that ignores the actual requirements.
  • Over-engineering the trivial parts; never reaching the hard ones.
  • Hand-waving "we'll just cache it" with no specifics.
  • Silence; the interviewer cannot score what they cannot hear.
  • Claiming a perfect design instead of owning the trade-offs.

See it applied

Each of the eight worked designs runs these exact seven steps end to end: Twitter, WhatsApp, Stripe, Uber, YouTube, Dropbox, Google Search, Ticketmaster. Read one alongside this sheet to see the framework in motion.

10

Traps & the repeatable move

The ways strong engineers still lose the room, and the habit that prevents it.

The traps

  • No scoping, you design everything and finish nothing.
  • No bounding number, choices float free of any constraint.
  • Breadth over depth, you never reach the parts that score.
  • A canned answer, it does not fit the requirements you were given.
  • No trade-offs, you present a design as if it had no cost.
  • Working silently, the interviewer cannot follow your reasoning.
  • Ignoring steers, the interviewer hints at the deep dive; take it.

The repeatable move

1. scope: requirements + the bounding number
2. spine: API, data, one clear diagram
3. depth: 2 to 3 hard parts, problem to fix to cost
4. trade-offs: name the call on each axis

The whole hour in four moves. Drive them in order, think aloud, and let the requirements (not a template) shape the design. That is the difference between reciting components and doing the job.

The umbrella for the eight worked designs and the From Senior to Staff sessions. Further reading: System Design Primer · common prompts · estimation cheat sheet · the full course.