Lesson 3 / 32
Back-of-the-Envelope Estimation
Quick math for QPS, storage, and bandwidth.
From DAU to QPS
A day has 86,400 seconds (100k). So 1M requests/day ≈ ~12 QPS average. Multiply by a peak factor of 2–10x for the real target.
Storage estimate
Estimate per-record size, multiply by write rate and retention.
500 bytes/tweet x 100M tweets/day
= 50 GB/day
x 365 x 5 years
~= 90 TB (before replication)
Output:
Plan for 3x with replicas ~= 270 TB
Round aggressively
Use powers of 10 and 2. The goal is the right order of magnitude — is it GB or PB? — not a precise figure.
Quick check: A service gets 8.6M requests/day evenly. Roughly what is the average QPS?
- ~1 QPS
- ~100 QPS
- ~1,000 QPS
Answer
~100 QPS — 8.6M / 86,400s ≈ 100 QPS average; peak would be higher.