Back-of-the-envelope calculations
easy 25 minA back-of-the-envelope calculation is a quick, rounded sum that tells you whether a design is feasible.
Remember it
The few things worth knowing cold, and how to make them stick.
Memory hook
CAFE: clarify, assume, figure, evaluate.
A pizza party: 20 friends, 3 slices each, 8 slices a pizza, so 8 pizzas. One more friend changes nothing.
Cheat sheet
- Day
- 86,400 s (100,000)
- Month, year
- 2.5M s, 30M s
- 1M / 1B a day
- 12 / 12,000 per second
- Peak
- 3 × average
- Traffic
- DAU × requests / 86,400
- Storage
- new items × size × retention
- Bandwidth
- per second × size (× 8 bits)
- Machines
- ⌈peak / (cap × 0.7)⌉ + 1
- Cache
- hot items × size
- Units
- KB, MB, GB, TB, PB: × 1,000 each
Spot it when you see
- "Millions of users" in the prompt.
- A part nobody can justify.
- Media, retention or a deadline.
Tricks that stick
- Drop five zeros from a daily total.
- Half and double: same decision? Stop.
- Units must cancel.
Do not forget
- Counting reads as storage.
- Bits for bytes.
- Dividing by full capacity.
- Planning for the average.