πŸ’¬
βœ‰οΈ
πŸ“Έ
▢️

Loading…

Design YouTube: video upload, transcoding, and CDN

YoutubeGuided Mode

🎬

2.7B users. 500 hours uploaded per minute.

Upload β†’ Process β†’ Stream to everyone, everywhere

The Video Streaming Problem

Users upload 500 hours of video every minute. Each video must be watchable on 2G mobile and gigabit fibre, on phones and 8K TVs, by viewers in Mumbai and SΓ£o Paulo. Handling this with a traditional API-and-database is fundamentally broken.

Request Flow

1

Upload problem

A 4K video is 5–30 GB. If every byte goes through your API server, you need thousands of cores just doing I/O β€” no business logic, just forwarding data.

2

Processing problem

A raw uploaded video can't be played on most devices. It must be transcoded into multiple resolutions and formats β€” a process that takes minutes to hours per video.

3

Delivery problem

Serving a 4K video from a single region in us-east-1 adds 150–300ms latency for viewers in Asia. Without CDN edge caching, every request hits the origin β€” latency and cost skyrocket.

Why We Need This

YouTube solves upload, processing, and delivery as three separate, independent systems β€” not one monolith.

Key Insight

Video systems are fundamentally different from request/response systems. Data flows one way and is enormous. You need dedicated upload offloading, async processing, and segmented CDN delivery.

Overview