Book Deep Read · System Design Interview Vol 1 · Ch 2

Back-of-the-Envelope Estimation

System Design Interview: An Insider's Guide · Vol 1 · Ch 2 · Alex Xu · 2020

中文 →

What is this chapter about?

Before a move, you don't weigh each box. You take one look and ask: will all of this fit in a small van? That look costs three seconds, and it decides which phone call you make today. This chapter teaches the engineer's version of that look: before building anything, use a few rough numbers to work out whether the job is a small-van job or a fleet-of-trucks job.

A strange thing first

This chapter never produces a precise answer. Every number it computes is guessed, rounded, and shrugged at. And yet it is one of the most useful chapters in the book. Because what shapes an architecture is never "3,512 or 4,108" — it is "three thousand or three million". Those are two different worlds, and they should not be built the same way.

Why the old world was hard

Teams that skip this step reliably fall into two opposite holes.

Overestimating. The product has barely any users, but the team has already built out heavy machinery for the size it imagines it will one day be. Half a year later, most of the effort has gone into maintaining that machinery, and the product itself has hardly moved.

Underestimating. The plan sounds fine, and then it ships — and it turns out the thing you need to store is not "buy a bigger drive" sized, it is "fill a warehouse" sized. By the time anyone notices, the only fixes left are the expensive, painful ones.

Both holes share one cause: nobody spent three minutes writing the rough quantities on paper before starting.

The core mechanism: three small habits

1. Keep a few rulers in your head. A cook doesn't need a measuring cup to know roughly what a pinch of salt is. An engineer needs the same instinct for a few everyday quantities: fetching something from memory is "a blink", walking down to the garage for it is "a trip", and posting it to the far side of the planet and back is "an international parcel". The gaps between those three are enormous — remember the gaps, and many designs can be ruled out without any arithmetic at all.

2. Write your assumptions down. The real output of an estimate is not the number, it is the list underneath it: how many people use this, how often each day, how much each use leaves behind, how long it is kept. Written down, someone else can point at one line and say "I disagree with that one" — and the discussion turns from guesswork into "change that line and run it again".

3. Round hard, and only trust the order of magnitude. Round the awkward numbers to clean ones before you start, and read only which bracket the result lands in. This isn't laziness: your inputs were guesses to begin with, and running guessed inputs through precise arithmetic just gives you a very precise wrong answer.

How to use it

One step gets skipped more than any other: after the average, always ask what the busiest moment looks like. A restaurant that sets out chairs for its all-day average will collapse at noon. In the real world the busiest instant is often dozens of times the average, not "a bit more".

One honest cost: this method only tells you which bracket you are in. It can never answer "will it actually hold?" — only really pushing load through it can.

One line to remember

Estimation isn't about being right. It's about ruling out the obviously impossible in three minutes. Write the assumptions, round hard, read the order of magnitude — then ask one more question: what about the busiest moment?

Want the mechanisms, the numbers and the diagrams? → Switch to the deep read