Skip to main content
Estimation Rules of Thumblesson 1 of 3 · 3 min read

The Arithmetic Toolkit

Five formulas

Your toolkit is small. Learn five formulas and two supporting facts and you can size almost anything.

Time first. A day is 86,400 seconds, and you should round it to 100,000, because dividing by that in your head is trivial and dividing by 86,400 is not. A year is about 31.5 million seconds, so round to 30 million. That rounding costs you maybe 15 percent. You only trust these numbers within a factor of two or three anyway.

Next, requests per second: daily active users times actions each per day, divided by seconds in a day. Ten million users doing ten requests each is 100 million a day, about 1,000 a second on average. Then multiply by two to five for peak, because traffic is never uniform. Call it 3,000 at peak and move on.

Then storage: your write rate times record size times how long you keep it. A hundred writes a second of one kilobyte records kept for a year is about 3 terabytes.

The users-to-bytes shortcut is worth keeping close. A million users at a kilobyte each is a gigabyte, and a billion users at a kilobyte is a terabyte. Scale linearly from those two anchors and most storage questions become one multiplication.

Bandwidth and machines finish it. Bandwidth is your requests per second times average response size. A thousand requests a second at 100 KB is 100 MB a second, or 800 megabits. Machine count is your peak requests divided by what one machine handles. 100,000 a second over machines doing 10,000 each is ten, so provision fifteen for headroom.

Two supporting facts

Add two supporting facts. Roughly 80 percent of your reads hit 20 percent of your data, so a cache holding a fifth of the working set absorbs most of your traffic. And compression shrinks text formats by five to ten times, which can move a bandwidth answer a full order of magnitude. Everything past this point is multiplication and nerve.

the shape of it
10M usersx 500 eventsx 200 bytes= 1 TB of memorythousands a month
step 1 of 3
Three multiplications, twenty seconds, and the proposal is costed before anybody builds it.

Worked example

Wei is prepping for interviews and times himself estimating a URL shortener. The first attempt takes 11 minutes, mostly spent long-dividing by 86,400 and mixing up megabits with megabytes. He rebuilds his habits around the toolkit: a day rounds to 100,000 seconds, a month to 2.5 million, bits are for network links and bytes for everything else. Second attempt: 100 million new links a month is 100 million over 2.5 million seconds, 40 writes per second; a 10 to 1 read ratio makes 400 reads per second; 500 bytes per link times 100 million a month is 50 GB monthly, about 600 GB a year, one machine with room to spare. Elapsed time: 4 minutes, with every number carrying its assumption. The formulas didn't change between attempts. The rounding discipline did.