← All Concepts
Fundamentals
Back-of-the-Envelope Estimation
Quick calculations to estimate system capacity, helping you make informed design decisions during interviews.
**Key numbers every engineer should know:**
**Latency:**
- L1 cache: 0.5 ns
- L2 cache: 7 ns
- RAM: 100 ns
- SSD random read: 150 μs
- HDD seek: 10 ms
- Network round trip (same datacenter): 500 μs
- Network round trip (cross-continent): 150 ms
**Throughput:**
- SSD: 1 GB/s
- Network (1 Gbps): 125 MB/s
- HDD: 100 MB/s
**Storage:**
- 1 char = 1 byte (ASCII) or 2 bytes (Unicode)
- 1 million rows × 1KB = 1 GB
- 1 billion rows × 1KB = 1 TB
**Scale:**
- 1M requests/day = ~12 requests/sec
- 1B requests/day = ~12,000 requests/sec
- 86,400 seconds in a day (round to 100K for estimates)
**Power of 2:**
- 2^10 ≈ 1 thousand (1 KB)
- 2^20 ≈ 1 million (1 MB)
- 2^30 ≈ 1 billion (1 GB)
- 2^40 ≈ 1 trillion (1 TB)
Common Use Cases
- Estimating storage requirements for a system
- Calculating QPS and required server capacity
- Determining if a dataset fits in memory
- Choosing between different storage technologies
Advantages
- +Quick sanity check for design decisions
- +Demonstrates quantitative thinking in interviews
- +Helps identify bottlenecks before building
- +Guides technology and architecture choices
Disadvantages
- -Estimates can be wildly off without correct assumptions
- -Oversimplification may miss important factors
- -Numbers change as hardware evolves
- -Can give false confidence if assumptions are wrong
Related Concepts
scalabilitycapacity planningbenchmarking