Back-of-the-Envelope Calculations 00:00:01 Start from the quantity to decide A candidate proposes buying forty-four servers. The interviewer asks one question. Forty-four servers for what workload, at what tested capacity, after losing how many machines? The multiplication is the easiest part to defend. What is asked: reads a second. Ask for daily users and views per user. No numbers given, so say them: 100 million users, 10 views each. That is 1 billion a day. Take five zeros off. 10,000 a second (exactly 11,574). Three times the average: 30,000 a second (exactly 34,722). At 70% of 1,000 a second, 30,000 needs 43 machines, plus one spare is 44. So it is a fleet behind a balancer. A daily user count is not a peak request rate. Add actions per user and a plausible peak multiplier, then compare against capacity measured for that same action. 00:01:01 Separate several different budgets Each sum belongs to one part of the system. 10 million users times 50 requests / 86,400 is 5,800 a second. 17,400 over 700 is 24.9, so 25, plus one spare: 26 servers. 17,400 responses of 10 KB are 174 MB a second, or 1.4 Gb/s. 50 million records, 20% hot, 1 KB each: 10 GB. 10 million new records a day of 1 KB is 10 GB a day, 3.65 TB a year. Requests per second, bytes per second and retained bytes answer different questions. A design may fit its objects on one machine while exhausting its network link long before the disk is full. 00:01:51 Turn the inputs one at a time Change one input at a time. Here 10% of requests write 1 KB, kept one year. 100 million users, 10 requests: 1 billion a day, 34,722 a second at peak, 36.5 TB a year. Everything doubles. Back to 100 million users, 50 requests each. Everything is five times the start. Traffic does not move. Storage is ten times larger. Again only storage: 9,125 TB in all, one copy. When only retention doubles, capacity for stored data doubles while today's request rate can stay the same. Changing every input at once makes it hard to tell what really drove the decision. 00:02:35 Find the threshold where the choice flips 1M users times 5 clicks times 10 reads a click is 50 million a day: 500 a second, 1,500 at peak. It fits. 10 clicks: 3,000 reads a second. It fits with room. 20 clicks: 6,000. Still one database. 40 clicks: 12,000 is past the planning line. So the line is at about 33 clicks: watch that number after launch. The estimate need not predict a single perfect number. If one plausible usage assumption crosses the capacity limit, measuring that input can be more valuable than refining five unrelated numbers. 00:03:14 A result too big for one person Someone presents 10 billion clicks a day from 1 million users. It sounds impressive, and nobody objects. 10 billion over 1 million is 10,000 clicks each. 16 waking hours are 57,600 seconds. That is a click every 6 seconds, all day. An input is off by about 100. Perhaps page parts were counted as clicks. Ask, then redo the sum. Divide the headline back down to actions per customer per day. If an ordinary person would have to perform an implausible number of actions, revisit what the instrumentation counted. An estimate is useful when its assumptions can be challenged and its result changes a real decision. Keep the units, the headroom and the consequence of being wrong together.