Stage 4 · Provision
System Design Interviews
Back-of-the-Envelope Estimation
QPS, storage, bandwidth, cache size, and fanout estimates using powers of ten.
Why Estimation Matters
Back-of-the-envelope estimation is the ability to quickly approximate system requirements without detailed analysis. It helps you size infrastructure, identify bottlenecks, and communicate design feasibility. SREs use estimation to plan capacity and evaluate proposals.
Powers of Ten
| Metric | Value | Reference |
|---|---|---|
| 1 ms | 0.001s | Network round trip within a datacenter |
| 10 ms | 0.01s | Cross-continent network round trip |
| 100 ms | 0.1s | Human perception threshold |
| 1 second | 1s | User attention span limit |
| 1 KB | 10^3 bytes | A short email |
| 1 MB | 10^6 bytes | A high-res photo |
| 1 GB | 10^9 bytes | A standard movie |
| 1 TB | 10^12 bytes | Library of Congress text |
QPS Estimation
Queries per second (QPS) is the primary metric for sizing systems. Estimate QPS from user count, usage frequency, and peak-to-average ratio.
Service: URL Shortener
Daily active users: 100 million
Requests per user per day: 5 (average)
Peak multiplier: 3x
Average QPS:
100M users × 5 requests / 86400 seconds
= 500M / 86400
≈ 5,800 QPS
Peak QPS:
5,800 × 3 = 17,400 QPS
Read/Write split (80% reads, 20% writes):
Read QPS: 13,900
Write QPS: 3,500Start with daily active users, multiply by requests per user, divide by seconds in a day, and apply peak multiplier. This gives you the QPS to design for.
Storage Estimation
Storage estimation determines how much data your system will store over time. Consider record size, write rate, and retention period.
URL record size: ~200 bytes (short URL, original URL, metadata)
Daily new URLs: 10 million (20% of 500M requests)
Retention: 5 years
Daily storage: 10M × 200 bytes = 2 GB/day
Yearly storage: 2 GB × 365 = 730 GB/year
5-year storage: 730 GB × 5 = 3.65 TB
With replication (3x): 3.65 TB × 3 ≈ 11 TBCalculate daily storage, multiply by retention period, and apply replication factor. This gives you total storage requirements.
Bandwidth Estimation
Bandwidth estimation determines the network throughput required. Multiply QPS by average request/response size to get required bandwidth.
Read QPS: 13,900
Average response size: 1 KB
Inbound bandwidth: 13,900 × 1 KB = 13.9 MB/s
Outbound bandwidth: 13,900 × 1 KB = 13.9 MB/s
Total: ~28 MB/s ≈ 224 Mbps
For reference:
- Single 10 Gbps NIC: 1,250 MB/s
- Single 1 Gbps NIC: 125 MB/s
- Need: ~28 MB/s (well within 1 Gbps)Bandwidth requirements are usually the least constraining factor. Storage and compute are typically the bottlenecks.
Common Estimation Patterns
- Read-heavy (80/20 rule) — 80% reads, 20% writes for most applications.
- Peak is 3-10x average — Design for peak, not average.
- Cache hit rate 80-99% — Only a fraction of requests hit the database.
- Storage grows linearly — Plan for 3-5 years of data retention.
- Latency compounds — Each service hop adds 1-10ms.
Pick a service you use daily and estimate its QPS, storage, and bandwidth. Netflix, Twitter, and WhatsApp are good practice targets. The more you practice, the faster you get.
Mark this lesson complete to store local progress and unlock a cleaner resume path the next time you visit.