YouTube Design
Difficulty: Hard · Topics: Distributed Systems, Media Streaming, Video Transcoding, CDN Architecture, Cloud Storage · Company Tags: (as originally associated) · Hints: (as originally associated)
YouTube is a video-sharing service where creators upload recorded files, and viewers consume them on demand from many different devices and network connections. From a systems-design viewpoint, the product weaves together two distinct challenges: reliably ingesting very large user uploads without burdening the application tier, and then delivering that same content back to a massive audience as low-latency, segmented streams under extreme read skew.
Functional requirements
upload_id or a video_id.Non-functional requirements
300 ms to create an upload session and 200 ms p95 for playback bootstrap (manifest lookup or the first critical request).1M uploads per day, 100M video watches per day, videos reaching tens of GB, and severe hot-video read skew concentrated on a small share of titles.Back-of-the-envelope estimation
| Quantity | Assumed value | Purpose |
|---|---|---|
| Uploads per day | ~ 1M | upload-session churn, multipart cleanup, packaging queue load |
| Watches per day | ~ 100M | CDN and origin read skew, metadata lookup rate |
| Mean packaged size per minute of video (all renditions) | ~ 10–50 MB | storage and egress order-of-magnitude |
| Typical segment duration | 2–10 s | segment count per watch, cache-key churn |
| Playback bootstrap budget | ~ 200 ms p95 | metadata store sizing, caching of small responses |
| Hot video multiplier | to of median traffic | CDN fill, origin shielding, regional promotion |
These numbers clarify why the watch path cannot be "read one enormous file from a database," why metadata lookups must stay cheap and keyed, and why segments and manifests serve as the unit of caching and retry. The 200 ms bootstrap budget drives the metadata path toward one small keyed read, while the hot-video multiplier makes first-segment cache fill and origin shielding a first-class design decision rather than an afterthought.
High‑level YouTube system design showing upload ingestion and adaptive‑bitrate playback delivery.
Out of scope (below the line)