System Design Interview FrameworkLesson 1.3
Back-of-envelope estimation for system design interviews
DAU to QPS conversion, storage estimation, bandwidth calculation, memory estimation, powers of two cheat sheet
Why Estimation Matters
Estimation tells you whether you need one database or one hundred. Interviewers use it to see if you can translate business numbers into infrastructure decisions.
The QPS Formula
QPS (queries per second) is your anchor metric:
DAU = 10,000,000
avg requests/user/day = 10
total requests/day = 100,000,000
QPS = 100,000,000 / 86,400 โ 1,160 QPS
peak QPS โ 2-3x avg โ 3,000 QPSStorage Estimation
tweets/day = 100M
avg tweet size = 200 bytes
storage/day = 100M ร 200B = 20 GB/day
storage/5 years = 20GB ร 365 ร 5 โ 36 TBKey Numbers to Memorize
- 1 million seconds โ 11.5 days
- 1 byte = 8 bits
- 1 KB = 10ยณ bytes, 1 MB = 10โถ, 1 GB = 10โน, 1 TB = 10ยนยฒ
- SSD read: ~100ฮผs, network round-trip: ~150ms cross-region
Round aggressively. Interviewers care about the order of magnitude, not the exact number. Being off by 20% is fine; being off by 100x is a red flag.
