System DesignOct 8, 2026⏱️ 4 min read
Back-of-the-Envelope Estimation: QPS, Storage, Bandwidth & Latency Math

Back-of-the-Envelope Estimation: QPS, Storage, Bandwidth & Latency Math

Why Estimation Drives Real Architectural Decisions

Back-of-the-envelope estimation is not about producing exact decimals—it is about narrowing down orders of magnitude in two minutes so you pick the right architecture.
Knowing whether a service handles 500 QPS vs. 500,000 QPS, or 2 TB vs. 20 PB over five years, immediately tells you whether a single PostgreSQL primary suffices or whether you need Kafka partitioning, consistent hashing, and object storage tiering.
Back-of-the-Envelope Estimation Cheat Sheet

Back-of-the-Envelope Estimation Cheat Sheet


1. Powers of Two Cheat Sheet

Round aggressively using powers of two to convert bytes effortlessly in your head:
PowerExact ValueApproximate ScaleUnit
$2^{10}$1,0241 Thousand1 KB
$2^{20}$1,048,5761 Million1 MB
$2^{30}$1,073,741,8241 Billion1 GB
$2^{40}$$\approx 1.1 \times 10^{12}$1 Trillion1 TB
$2^{50}$$\approx 1.12 \times 10^{15}$1 Quadrillion1 PB

2. Essential Latency Numbers Every Engineer Should Know

Understanding hardware speed gaps explains why caching and sequential disk I/O dominate system design:
OperationApproximate LatencyRelative Scale
L1 cache reference0.5 nsInstant
Mutex lock/unlock100 ns200× slower
Main memory (RAM) lookup100 nsFast random access
Compress 1 KB with Snappy/LZ410 µsCPU-cheap
NVMe SSD random 4 KB read150 µs1,500× slower than RAM
Read 1 MB sequentially from SSD1 msFast sequential throughput
Datacenter same-zone round-trip0.5 msMicroservice hop budget
Cross-continent packet (US ↔ EU)150 msWhy CDNs & Edge matter
Three Practical Rules from This Table:
  1. RAM is orders of magnitude faster than SSD/disk—keep hot indexes and feeds in Redis.
  2. Minimize cross-datacenter round trips on synchronous user-facing requests.
  3. Compress payloads before sending them over wide-area networks.

3. High Availability & SLA Downtime Budgets

Availability %Downtime / YearDowntime / DayEngineering Implication
99% (Two 9s)3.65 days14.4 minBasic single-region app
99.9% (Three 9s)8.77 hours1.44 minMulti-AZ failover
99.99% (Four 9s)52.6 minutes8.64 secAutomated health checks & replication
99.999% (Five 9s)5.26 minutes864 msActive-active multi-region, zero-downtime deploys

4. Worked Example: Social Microblogging Capacity Math

Suppose we design a Twitter-like platform with:
  • 300M Monthly Active Users (MAU), 50% Daily Active Users (150M DAU).
  • Each user posts 2 tweets/day and views 50 tweets/day.
  • 10% of tweets include a 1 MB image/media file.
  • Retention window: 5 years.

Step A: Queries Per Second (QPS)

Remember: $1\text{ day} = 86,400\text{ seconds} \approx 10^5\text{ seconds}$ (easy mental rounding!).
  • Write QPS (Tweets): $$\frac{150\text{M} \times 2}{10^5} = 3,000\text{ QPS}$$
    • Peak Write QPS ($2\times$ to $3\times$ average): ~6,000 – 9,000 QPS.
  • Read QPS (Views): $$\frac{150\text{M} \times 50}{10^5} = 75,000\text{ QPS}$$
    • Peak Read QPS: ~150,000+ QPS (clearly read-heavy: demands aggressive feed caching & CDN).

Step B: Daily & 5-Year Media Storage

  • Tweets per day: $150\text{M} \times 2 = 300\text{M tweets/day}$.
  • Tweets with media ($10%$): $30\text{M media files/day}$.
  • Daily Media Storage: $30\text{M} \times 1\text{ MB} = 30\text{ TB/day}$.
  • 5-Year Media Storage: $$30\text{ TB/day} \times 365 \times 5 \approx 54,750\text{ TB} \approx 55\text{ PB}$$

Step C: Cache Sizing (80/20 Rule)

Caching the hottest 20% of daily tweets in Redis (500 bytes metadata each): $$300\text{M} \times 0.2 \times 500\text{ bytes} = 30\text{ GB RAM}$$ A single modest Redis cluster easily holds the entire hot working set!

Summary Checklist

  • Always round $86,400 \rightarrow 10^5$ seconds/day for instant QPS estimates.
  • Multiply average QPS by 2×–3× for peak sizing.
  • Separate metadata storage (SQL/NoSQL) from blob storage (S3/CDN) in every estimate.

Share this article

Comments