1. Requirements before boxes
One-liner. Get function, scale and constraints on the table before drawing anything.
Memorize
- Functional: what the system does (post a photo, follow a user).
- Non-functional: scale, latency, availability, consistency, cost, compliance.
- Back-of-envelope: DAU → QPS, payload size → storage/year, peak = 3–5× average.
- Latency ladder: memory 100 ns · SSD 100 µs · same-DC round trip 0.5 ms · disk seek 10 ms · cross-continent 150 ms.
- Read:write ratio decides cache/replica strategy more than any other number.
- State assumptions out loud; wrong assumptions are recoverable, hidden ones are not.
Trap. Designing the diagram first and inventing requirements to justify it. Do this. Write the 3 numbers you'd bet the design on (QPS, data size, latency target).
Check
A photo app has 10M daily users, each uploads 2 photos/day at 1.5 MB. Roughly how much new storage per year (before replication)?
Why
10M × 2 × 1.5 MB = 30 TB/day; × 365 ≈ 11 PB/year. Multiply by replication factor and add indexes for the real number.