SSystem Design

Complete guide · 27 topics · interview-ready

System design, from requirements to a whiteboard you can defend

Every topic here answers three questions: why does this exist, what does it cost you, and what do you say when an interviewer asks. No architecture diagrams to memorise — just the reasoning that produces them.

How to use this

Three steps, one topic a day. The order below is deliberate: each block assumes the one before it.

  1. Pick one topic and understand why it exists. Every component in a distributed system is a fix for a specific failure of the simpler design. Learn the failure first — the component then becomes obvious rather than something to memorise.
  2. Design one related system on paper and say every decision out loud. Not typed. Spoken. The gap between "I understand sharding" and "I can explain why I sharded on user_id and what breaks when one user goes viral" is the entire interview.
  3. Do not memorise architectures. Practise connecting a requirement to a component. "10M writes/day, read-heavy, eventual consistency is fine" should produce a design; a memorised Twitter diagram will not survive the first follow-up question.
The one habit that matters

After every design decision, say the sentence "…and the cost of that is ___." A design with no stated costs reads as a design you do not understand. Interviewers are grading the tradeoff, not the box.

The 27 topics

Block A — Fundamentals

The four things every single design touches, in the order you use them.

Block B — Data

Where the hard, irreversible decisions live.

Block C — Distributed behaviour

How independent machines cooperate without lying to each other.

Block D — Platform

The systems you plug in rather than build.

Block E — Full designs

Seven complete walk-throughs. Read these last; they only make sense once A–D are in place.

Plus

The interview section is separate on purpose: a 45-minute framework, phrases that buy thinking time, a 60-question bank with full answers, the grading rubric interviewers actually use, and the red flags that sink otherwise-good candidates.

The 27-day plan

One topic a day. Tick a day when you have both read it and explained a related design out loud. Progress is stored in this browser only.

0 of 27 done
Day 1read
Day 2read
Day 3read
Day 4read
Day 5read
Day 6read
Day 7read
Day 8read
Day 9read
Day 10read
Day 11read
Day 12read
Day 13read
Day 14read
Day 15read
Day 16read
Day 17read
Day 18read
Day 19read
Day 20read
Day 21read
Day 22read
Day 23read
Day 24read
Day 25read
Day 26read
Day 27read

The method, in one diagram

Every design in this guide follows the same path. When you freeze in an interview, restart from box one.

1 · Scope functional + non-functional 2 · Estimate QPS, storage, bandwidth 3 · API the contract clients rely on 4 · Data entities, store, shard key 5 · Draw it boxes on the happy path 6 · Break it bottleneck, failure, scale every bottleneck sends you back to the numbers, not to a bigger diagram ≈5 min · 5 min · 5 min · 8 min · 12 min · 10 min in a 45-minute round
The six-step loop. Steps 1–2 are where most candidates rush and most points are lost.

Numbers worth memorising

You need these fast enough to do arithmetic while talking. Full versions on the cheat sheet.

~86,400seconds in a day (call it 100k)
1M/day ≈ 12/sthe conversion you will use every time
×2–10peak-to-average traffic ratio
0.5 msdatacentre round trip
~150 mscross-continent round trip
0.1 msSSD random read
~10 msspinning disk seek
5k–15k QPSone commodity app server
~100k ops/ssingle Redis node
1 KB × 1M= 1 GB. Scale from here.

The mistakes that cost offers

Fatal
  • Drawing boxes before agreeing on requirements.
  • Never stating a single tradeoff.
  • Naming technologies as answers — "I'd use Kafka" with no why.
  • Ignoring the interviewer's hints. They are steering you on purpose.
  • Silent thinking for 60+ seconds.
Expensive
  • Designing for a billion users when the prompt said a million.
  • Forgetting the write path — most candidates over-plan reads.
  • No failure discussion: what happens when this box dies?
  • Sharding on a key you cannot query by.
  • Claiming "exactly-once delivery" without qualification.
What a strong candidate sounds like

"Reads are 100× writes, so I'll optimise the read path with a cache and accept a stale window of a few seconds. That's fine for a feed and not fine for a balance — if this were money I'd read from the primary instead."