Back-of-the-Envelope Calculation Guide for System Design Interviews
In high-stakes software engineering interviews (Google, Meta, Amazon, Netflix), Back-of-the-envelope calculations demonstrate your ability to convert ambiguous product requirements into concrete engineering boundaries: QPS, network bandwidth, storage growth, and cache requirements.
1. Fundamental Formulas Every Systems Architect Uses
- Seconds in a Day: There are 24 × 3,600 = 86,400 seconds in a day. For quick whiteboard mental math, engineers approximate this to 100,000 (10^5) seconds/day.
- Average QPS: Average QPS = Total Daily Requests / 86,400.
- Peak QPS Multiplier: Traffic is never uniformly distributed. Production systems experience diurnal peaks. Standard practice applies a 2x to 5x peak multiplier over daily average.
- Bandwidth Conversion: Bandwidth is expressed in bits per second (bps), while storage is expressed in bytes (B). Always multiply bytes by 8 to obtain bits.
2. The 80/20 Pareto Rule for Cache Memory Sizing
According to the Pareto Principle in distributed systems, 20% of your daily content accounts for 80% of read traffic. To protect the database layer and maintain sub-10ms response latencies, size the Redis cluster to hold the top 20% of daily read data in RAM:
Cache Memory Required (RAM) = Daily Ingest Data × 20%3. Latency Numbers Every Programmer Should Know
| Operation | Real Time | Human Scale Equivalent |
|---|---|---|
| L1 Cache Reference | 0.5 ns | 1 second |
| Main Memory (RAM) Reference | 100 ns | 3.3 minutes |
| NVMe SSD Random Read | 16 µs | 9 hours |
| Cross-Datacenter Roundtrip | 150 ms | 9.5 years |