Interview Prep
Estimation and Back-of-Envelope
Back-of-the-envelope estimation grounds your design in reality. Learn to quickly calculate storage, bandwidth, and compute requirements that drive architectural decisions.
- Quantification β Turn abstract problems into concrete numbers
- Approximation β Use reasonable assumptions to bound the problem
- Validation β Check if your numbers make sense against real-world systems
Numbers don't lieβbut wrong assumptions do.
The Fermi Estimation Method
Named after physicist Enrico Fermi, this method breaks complex problems into simpler, estimable components.
The Estimation Framework
Follow these steps for any estimation problem:
- Clarify the goal β What exactly are we estimating?
- Break it down β Identify the component parts
- Estimate each part β Use known references and benchmarks
- Combine β Multiply or add the estimates
- Sanity check β Does the result make sense?
Essential Reference Numbers
Memorize these benchmarks for quick estimation:
| Category | Reference Values |
|---|---|
| Users | World population ~8B, internet users ~5B, US population ~330M |
| Data | 1 character = 1 byte, 1 page text β 2KB, 1 photo β 2-5MB, 1 video β 100MB-1GB |
| Time | 1 day = 86,400 sec, 1 month β 2.6M sec, 1 year β 31.5M sec |
| Numbers | 1K = 1,000, 1M = 1M, 1B = 1B, 1T = 1 trillion |
| Storage | 1TB = 1,000GB, 1PB = 1,000TB, 1EB = 1,000PB |
QPS Estimation
Queries per second (QPS) is the most fundamental metric:
Storage Estimation
Estimate how much data the system will store:
Bandwidth Estimation
Calculate network bandwidth requirements: