System 12.11 — YouTube (Video Platform)
In one line
The media pipeline made enormous: upload, transcode variants, adaptive-bitrate streaming over CDN.
Think of it like this
A video platform where uploading a single video quietly triggers a factory line behind the scenes: compressing it into many qualities (480p, 720p, 4K) so it plays smoothly whether you're on 4G or fibre.
Key ideas
- 01
Upload: signed multipart upload to object store → video metadata → async transcode pipeline (workers + queue).
- 02
Transcode: one raw file → many renditions (240p→4K, HLS/DASH segments, ~6s chunks) for adaptive bitrate.
- 03
Serving: CDN is EVERYTHING — 90% of bytes come from edge; origin only for cold/miss; cache at edge + regional tier.
- 04
Adaptive streaming: client switches rendition by bandwidth — manifest first (HLS .m3u8), segments by range request.
- 05
Scale reality: 500h video uploaded per minute; 1B+ viewers. Storage: massive object store + tiered to cold storage.
- 06
Metadata plane: video table (ids, title, views counter) in DB; views = Redis INCR + async flush to the row.
- 07
Recommendations/search: ML offline + ES index; trending = streamed click/view aggregations.
- 08
Interviews like the pipeline + CDN + the 'what's the actual bottleneck' answer (transcode CPU + edge bandwidth cost).
Code & diagrams
Upload once, transcode into every quality, serve from the edge forever.
Explain without notes
Walk a 4K-upload: which services touch it, what the transcode queue holds, and what a worker crash loses.
Practice
Draw DASH/HLS rendition ladder + CDN layering + the view-count async pipeline.
Trade-offs
- ↔
Transcode quality vs CPU cost (rendition ladder = cost ladder); nearline vs cold storage for old uploads.
Run it in production
You've designed it. Now build, operate, and break the same idea hands-on in the DevOps courses:
Completion checklist
I can present upload→transcode→CDN→adaptive-stream and the cost levers.