Designing Data-Intensive Applications
Case 2

Back-of-the-Envelope Estimation

Rough capacity for video ingest, CDN egress, metadata QPS, and storage growth at YouTube scale.

Order-of-magnitude checks catch designs that cannot work. Adjust assumptions for your interview scope — exact numbers matter less than which component becomes the bottleneck.

Assume 500M DAU, 1B video views/day, 500k new uploads/day, average watch time 10 minutes at 3 Mbps, metadata API ~2 KB per video page load.

Read traffic

  • Views/day → 1B / 86,400 ≈ 11,600 views/s average.
  • Peak (prime time ×5) ≈ 58,000 metadata reads/s for titles, manifests, comments.
  • CDN video bytes: 1B views × 10 min × 3 Mbps / 8 ≈ 2.25 EB/day theoretical max — in practice ABR averages ~1 Mbps → ~750 PB/day egress; 95%+ served from CDN cache (long-tail + viral).
  • Metadata cache (Redis): hot 1% of videos = 10M keys × 2 KB ≈ 20 GB — fits a modest cluster.

Write traffic

  • Uploads: 500k/day ≈ 5.8 uploads/s average, peak ~30/s.
  • Avg raw upload 500 MB → 500k × 500 MB ≈ 250 TB/day ingest to object storage.
  • Transcode fan-out: 4 renditions × 500k ≈ 2M FFmpeg jobs/day → ~23 jobs/s sustained, burst queue depth in Kafka matters.
  • View-count events: batched — 1B events/day to stream processor ≈ 11,600 events/s (not 1B UPDATEs on Postgres).

Storage

  • Catalog: 500M videos × 2 KB metadata ≈ 1 TB (+ indexes → plan 3–5 TB).
  • Raw + transcoded: 500k new/day × (500 MB raw + ~1.5 GB segments) ≈ 1 PB/year growth — tier cold content to cheaper storage class.

Network & memory

  • Upload path bandwidth: 250 TB/day ÷ 86,400 ≈ 2.4 GB/s average ingest — dedicated upload endpoints, not mixed with API.
  • Transcoder fleet: ~23 concurrent jobs/s × ~2 min/job ≈ 3,000 workers at peak if not batched overnight.
  • Origin shield: without CDN, 750 PB/day is impossible — CDN is mandatory, not optional.
typescript — YouTube peak metadata QPS
// YouTube-scale metadata reads
const viewsPerDay = 1_000_000_000;
const avgQps = viewsPerDay / 86_400;
const peakQps = avgQps * 5;
const uploadQps = 500_000 / 86_400;
const uploadBytesPerDay = 500_000 * 500 * 1024 * 1024; // 500 MB avg
console.log({
  peakMetadataQps: Math.round(peakQps),
  avgUploadQps: uploadQps.toFixed(1),
  uploadTbPerDay: (uploadBytesPerDay / 1e12).toFixed(0) + " TB",
});
Order-of-magnitude summary

~60k peak metadata QPS, ~750 PB/day video egress (mostly CDN), ~250 TB/day upload ingest, ~1 PB/year storage growth. Separate read (CDN) from write (upload + transcode) paths.

Key Takeaways
  • ~60k peak metadata QPS; video bytes served mostly from CDN.
  • ~250 TB/day upload ingest; transcode is async, not synchronous API work.
  • ~1 PB/year storage growth — tier cold content aggressively.
  • Separate write path (upload + transcode) from read path (CDN + metadata cache).
QPSbandwidthCDNstoragetranscodingcache