System Design Interview, mapped

In a system design interview, you get one vague prompt — “build a URL shortener” — and 45 minutes on the clock. With no single right answer, it is hard to prepare for and all too easy to ramble.

This poster maps out the whole format: what interviewers grade, how to pace the time, the numbers worth keeping in your head, nine question families and the eight patterns behind them. Every figure comes from one worked example. For how those 45 minutes feel from both sides of the table, read Running a system design interview.

trishchuk.com / learn
Infographic

System Design Interview

What interviewers ask, how to pace 45 minutes, the numbers to keep handy, and the handful of patterns behind every question.

ClientLoad balancerAPI serversCacheQueueDatabaseWorkersClientLoad balancerAPI serversQueueDatabaseCacheWorkers
The sketch you will draw in almost every answer. The pink line is the read path — size it first.

What the interviewer grades

Five signals. The diagram is just how you show them.

  • Clarifying requirements

    You ask what to build, for whom and at what scale before drawing a single box.

  • Trade-offs

    You spell out the price of every choice: what you gain and what you give up.

  • Estimation

    You rough out the scale in orders of magnitude and let those numbers shape the design.

  • Depth

    You dig into one or two components properly instead of name-dropping ten.

  • Communication

    You think aloud, pick up on hints and drive the discussion instead of waiting to be prompted.

How to split forty-five minutes

The sequence matters more than watching the clock.

  1. 1

    Requirements 5 min

    Core features, non-functional targets (latency, availability, consistency) and what you are leaving out.

  2. 2

    Estimation 5 min

    Read and write QPS, storage and bandwidth — the load your design has to survive.

  3. 3

    API and data model 7 min

    A few endpoints and the main entities, tied to the access patterns they need to support.

  4. 4

    High-level design 10 min

    Client, balancer, services, cache, database, queue — then trace a real request end to end.

  5. 5

    Deep dive 13 min

    The trickiest piece — the interviewer often picks it: schema, sharding, caching or consistency.

  6. 6

    Bottlenecks and failures 5 min

    What breaks first, hot keys, single points of failure, monitoring and what you would tackle next.

Numbers worth knowing

Two minutes of rough maths usually settles the shape of the system.

Sizing a service

10M daily users making 20 reads and 2 writes a day. A record is 500 B, a response 2 kB, and we retain data for 5 years.

QuantityWorkingResult
Reads per day10M × 20200M
Average read QPS200M ÷ 86 4002.3k
Peak read QPS× 36.9k
Writes per day10M × 220M
Average write QPS20M ÷ 86 400231
Peak write QPS× 3694
Storage over 5 years20M × 500 B × 365 × 518.3 TB
Read bandwidth2.3k/s × 2 kB4.63 MB/s
Cache for the hot 20%, upper bound20% × 200M × 2 kB80 GB

Take peak load as 3× the average, and round 86 400 seconds to “about 10⁵” in your head. Here the maths points straight to one database for writes and a cache for reads.

Latency ladder

  1. L1 cache reference1 ns1 s
  2. Main memory reference100 ns1.67 min
  3. SSD random read100 µs1.16 d
  4. Round trip inside a data centre500 µs5.79 d
  5. Disk seek10 ms116 d
  6. Round trip across an ocean150 ms4.76 y

Orders of magnitude from Dean (2009), rounded and updated for SSDs. Treat them as rules of thumb, not benchmarks — what matters is the gap between rows.

Availability, as downtime

TargetPer yearPer month
99%3.65 d7.3 h
99.9%8.76 h43.8 min
99.99%52.6 min4.38 min
99.999%5.26 min26.3 s

Every extra nine cuts allowed downtime tenfold — and drives up engineering cost fast. Ask how many nines the product actually needs.

The questions come in families

Learn the family, and any new prompt is just a variation on it.

Lookup and storage

URL shortener, Pastebin, key-value store, Dropbox

ID generation, hashing, sharding, read-heavy caching.

Feeds and social

Twitter timeline, Instagram, news feed

Fan-out on write versus on read, ranking, celebrity accounts.

Messaging and real time

Chat, notifications, collaborative editing

Persistent connections, ordering, delivery guarantees, presence.

Media

YouTube, Netflix, photo sharing

Object storage, transcoding pipelines, CDN, resumable upload.

Location

Uber, nearby search, maps

Geohash or quadtree indexes, moving objects, matching.

Infrastructure primitives

Rate limiter, ID generator, message queue, job scheduler, web crawler, distributed lock

The component itself is the question: algorithms, failure modes, the exactly-once myth.

Transactions

Ticket booking, payments, hotel reservations, inventory

Double booking, idempotency, sagas, strong consistency where money moves.

Analytics

Ad click counting, top-K, leaderboard

Stream processing, windows, approximate counting, late data.

ML system design (recommendations, ranking, fraud) is its own beast. It builds on everything above, just with a model in the loop: features, training data, serving latency and feedback.

The patterns behind the questions

Eight ideas show up in almost every interview.

PatternSolvesToolsPrice you pay
Fan-out on write or readTimeline latency versus write costPer-follower inbox, merge on read, hybridWrite amplification or slow reads
ShardingOne machine is not enoughConsistent hashing, hash or range partitionsRebalancing, hot keys, cross-shard queries
CachingHot reads hammer the databaseCache-aside, write-through, TTL, CDNStale data, invalidation, stampedes
ReplicationAvailability and read scaleLeader-follower, quorum, multi-leaderReplication lag, conflicts
Queues and streamsSpiky or slow workMessage queue, log, workers, retry with backoffOrdering, duplicates, ops overhead
IdempotencyRetries must not run the action twiceIdempotency key, deduplication tableState to store and expire
Consistency choiceCorrectness or uptime during a failureStrong, eventual, read-your-writesLatency and availability (CAP, PACELC)
Probabilistic structuresExact answers cost too much memoryBloom filter, HyperLogLog, count-min sketchA controlled error rate

Fan-out: what each option costs

Push writes each post straight into every follower’s timeline — you pay once per follower:

  1. Friend 200200 writes for one post
  2. Popular account 10k10k writes for one post
  3. Celebrity 10M10M writes for one post

Pull flips the cost to read time, merging feeds from everyone you follow on the fly: about 300 rows if you follow 300 people.

Push is cheap for 200 followers and brutal for 10 million. Pull flips that: cheap writes, heavy reads. Real systems blend the two — push for everyday accounts, pull for celebrities.

Do

  • Ask first. Two minutes of questions save ten of redesign.
  • State the price. Say “I choose X, accepting Y”.
  • Trace one request. Walk a read and a write through your diagram from start to finish.
  • Lean on the numbers. Let QPS and storage earn every box on your diagram.

Avoid

  • Buzzword stacking: dropping Kafka or Cassandra without explaining why.
  • Ignoring failure: the interviewer will ask “what if this node dies?”.
  • Fighting hints: a nudge points straight to what the interviewer wants to see.
  • All breadth, no depth: ten boxes on the board, zero detail inside.

Practise

  • Timebox yourself: one prompt, 45 minutes, thinking out loud.
  • Sketch from memory each family’s base diagram until it feels automatic.
  • Re-derive the numbers from scratch instead of memorising answers.
  • Rehearse with a peer. Communication counts as much as the design itself.
Taras Trishchuk Structure after common interview practice; every number computed on this page trishchuk.com/learn

Where this comes from