Back-of-the-Envelope Estimation
Turn vague requirements into numbers you can design against: request rates, storage, bandwidth, concurrency and availability. Getting within a factor of two is the goal; a dropped zero is the real risk.
Key points
- 1
A day has 86,400 seconds (about 10^5), so 1M requests/day is about 12 QPS on average. Multiply by a peak factor (often 2-5×) and leave headroom on top.
- 2
Storage = items/day × bytes/item × retention × replication factor. Write out the units at every step.
- 3
Bandwidth is quoted in bits and storage in bytes. 1 MB/s = 8 Mbps, so mixing them is an 8× error.
- 4
Little's Law: in-flight requests = arrival rate × average time in the system (L = λW). Use it to size thread pools, connection pools and worker counts.
- 5
Know the latency ladder: RAM about 100 ns, same-datacenter round trip about 0.5 ms, disk seek about 10 ms, intercontinental round trip about 150 ms.
- 6
Availability: serial dependencies multiply their availabilities, while redundant replicas multiply their unavailabilities. Fan-out turns a leaf's rare p99 into the common case: 1 − 0.99^100 ≈ 63%.
Common traps
Sizing for the daily average instead of the peak hour.
Assuming redundant replicas fail independently, when shared deploys, configs and zones make them fail together.
Averaging latencies by hit ratio the wrong way round: at an 80% hit ratio, the database still dominates the mean.
Read the source
Test yourself on Back-of-the-Envelope Estimation
Ten questions, with the answer and explanation after each one.