Home/Labs/500M DAU Capacity Pipeline
All 280 Labs
INTERACTIVE LAB📊

QPS, Storage & Bandwidth Estimation Lab (Interactive)

Sweep DAU, media share, and CDN hit ratio to derive shards, Redis nodes, API pods, and line rates end to end. The full 500M-DAU walkthrough: write/read QPS, 5-year multi-tier storage, ingress/egress Gbps, 80/20 RAM cache sizing, and concrete fleet counts.

500M-DAU End-to-End Capacity Pipeline

QPS → 5-year storage → line rates → 80/20 RAM cache → concrete node, shard, and pod counts.

Step 1 — Traffic

Write QPS1,000
peak 2×: 2,000
Read QPS100,000
peak 2×: 200,000
R:W ratio100:1
drives engine + fan-out choice

Steps 2-3 — Storage & bandwidth

5-yr text DB91.3 TB
physical: ×3 repl +30% idx = 356 TB
5-yr media (S3)36.5 PB
20.0 TB/day → Glacier lifecycle
Ingress line rate1.60 Gbps
201 MB/s writes (bytes ×8 = bits)
Origin egress800 Mbps
raw 8.0 Gbps total → CDN offloads 90%

Step 4 — Fleet sizing

RAM cache20.0 TB
≈ 209 Redis nodes (96 GB usable)
DB shards178
keep each ≤ 2 TB for backups
API pods130
peak ÷ 2,000 +30% headroom
💡 Sequence on the whiteboard: QPS → Storage → Bandwidth → RAM → Node counts, then state each assumption before doing math.

How It Works Under the Hood

Capacity planning is a fixed five-step chain: QPS, storage, bandwidth, memory, node counts. 100M posts/day is 1,000 write QPS; 10B feed views is 100,000 read QPS. Five years of 500-byte metadata is ~91 TB before the 3x replication and 30% index multipliers, while 10M images/day becomes 36.5 PB in object storage. A 90% CDN hit ratio cuts 8 Gbps origin egress to 800 Mbps, and the 80/20 rule sizes the RAM tier at 20% of daily read volume — numbers that convert directly into pods, shards, and Redis nodes.

Core Architectural Principles

  • Read and write QPS each get a 2x peak factor, and fleet sizing uses peak, not average.
  • Text storage multiplies by 3 replicas plus 30% indexes; media lives in S3 with Glacier lifecycle rules.
  • Dividing 5-year storage by 2 TB yields shard counts; peak QPS divided by per-pod capacity yields the API fleet.
Interview Round Script

Write the five dimensions on the whiteboard before arithmetic: write QPS, read QPS, 5-year storage, bandwidth, RAM cache. Then translate every number into hardware: 90 TB means 64 shards, 20 TB RAM means roughly 208 Redis nodes, 8 Gbps egress justifies a CDN. Cap the math at five minutes of a 45-minute interview.

Key Trade-Offs

Rigorous sizing exposes bottlenecks early (media needs petabyte object storage, not Postgres) but rests on assumptions that shift — state them so the interviewer can challenge the inputs, not the arithmetic.

Related Curriculum Chapter

Estimating QPS, Storage, & Bandwidth: End-to-End Walkthrough

Read Full Chapter Blueprint

Explore More Interactive Labs

View All 280 Labs