StoicBuilder

HandbookXV the PantheonBack-of-the-envelope estimates

XVthe Pantheon, Design the system

Back-of-the-envelope estimates

1 min readUpdated 28 November

In plain words

A back-of-the-envelope estimate multiplies a few rough numbers, such as users, requests per user and bytes per record, to find the scale a design must handle before you commit to it.

Where you see it

Someone proposes storing every deploy log line in Harbor's main Postgres database. Five minutes of arithmetic: 50,000 deploys a day, 2,000 lines each, 200 bytes a line, kept for 90 days. That's about 1.8 TB, which changes the conversation before any code exists.

Estimate: deploy logsagent
deploys per day 50,000lines per deploy 2,000 -> 100 million lines a daybytes per line 200 -> 20 GB a daykept for 90 days -> about 1.8 TB, before indexesaverage writes 100M / 86,400 s -> about 1,200 lines a secondpeak (assume 5x) -> about 6,000 lines a second
Round numbers, working shown, and every assumption on its own line where someone can challenge it.

What goes wrong

  1. False precision

    1,157.4 writes a second suggests a certainty you don't have. Round to one or two significant figures; the question is whether it's a thousand or a million.

  2. Planning for the average

    Traffic arrives in peaks: Monday mornings, launches, retries after an outage. Multiply the average by a peak factor, and check the design holds at the peak.

  3. Hiding the assumptions

    An estimate with no visible inputs can't be checked or updated. Put each assumption on its own line, so someone who knows better can change one number.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Before proposing a design, do a back-of-the-envelope estimate: requests per second at average and peak, storage per day and per year, and bandwidth. Show each assumption on its own line with where it came from, round to one or two significant figures, and tell me which assumption the answer depends on most.

Quick check

Sign in to earn +10 XP for it

Harbor's API gets 100 million requests a day. Roughly how many is that per second, on average?

Got a prompt that touches Back-of-the-envelope estimates?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.