Lesson 3 of 16
40. Design Video Upload and Streaming (YouTube)

40.2 How big is this, really?

3 min read+10 XP

Step 2: Estimates (5 minutes)

Assume a ladder of 240p to 1080p totalling about 10.4 Mbit/s for all qualities together, an average 3 Mbit/s watched, and encoding at an assumed half real-time per worker for the whole ladder.

WhatWorkingResult
Hours uploaded a day500 × 60 × 24720,000 hours
Rendition storage per hour of video10.4 Mbit/s × 3,600 s ÷ 8≈ 4.7 GB
New renditions a day720,000 × 4.7 GB≈ 3.4 PB a day (plus originals)
Transcoding work720,000 hours ÷ 0.5 speed1.44 million worker-hours a day ≈ 60,000 busy workers
Data watched a day1 billion hours × 3 Mbit/s × 3,600 ÷ 8≈ 1.35 EB a day
Average egress1.35 EB ÷ 86,400 s≈ 125 Tbit/s

What the numbers say, out loud:

  • "Egress dwarfs everything. 125 Tbit/s on average can only come from CDNs and caches inside ISPs, close to viewers, never from our data centres alone."
  • "Transcoding is a huge, parallel batch workload: tens of thousands of workers, scaled by queue length, often on cheaper interruptible machines."
  • "Storage grows by petabytes a day, so tier it: hot copies for popular videos, cold storage and fewer qualities for the long tail."

Interviewer pushback:

  • "Do you store every quality for every video?" → Not necessarily. Most uploads get few views; encode a basic ladder first and add higher qualities or newer codecs (VP9, AV1) only for videos that get popular.

Memory code: "Petabytes in, exabytes out: the CDN is the system."