SysDesign study
Offline — showing the cached copy.
Home / Software System Design / 1. Requirements before boxes

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.
FROM PROMPT TO DESIGN Clarifyrequirements Estimate scale Pick data model Draw the flow Find thebottleneck
From prompt to design

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)?