Track cheat sheet
First principles cheat sheet
Where a request's time goes, how much traffic a design must carry, and what changes when one machine is not enough.
Key concepts
- One request, end to end
- A request's time is the sum of its hops: name lookup, connection setup, network round trips, and each server it touches.
- Napkin math
- Capacity estimates start from a daily number, then account for peaks, fan-out and headroom.
- Scale up or scale out
- Scale up with a bigger machine, or out with more machines behind a load balancer.
- Where the files go
- Large files hold a server for the whole transfer, so they belong in object storage, not in the app's request path.
Decision rules
- Reuse connections and cache names; time every hop with tracing, and fix the slowest one first.
- Plan for: daily ÷ 86,400 × peak factor × calls per action ÷ target utilisation.
- Scale out the stateless tiers, with headroom to lose one server; move state to a shared store first.
- The app issues a short-lived signed link; the client uploads straight to storage; a CDN serves the files.
Common traps
- Adding servers to a tier that is waiting on a slow hop somewhere else.
- Sizing for the average second, or counting user actions instead of the backend calls they cause.
- Treating a bigger machine as more reliable, when every restart of it still takes everything down.
- Streaming uploads through the app servers, where a busy evening of files crowds out every other request.
Lessons and boss fights
- One request, end to end · 3 min
- Napkin math · 3 min
- Scale up or scale out · 3 min
- Where the files go · 3 min
Real outages on this track: Our name servers were fine · Four times the previous peak · More nodes, more outages
BuildBreak · First principles · each line comes from its lesson, where the sources are linked.