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
Steps 2-3 — Storage & bandwidth
Step 4 — Fleet sizing
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.
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.
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.