YouTube
Upload and playback are very different workloads. Work through resumable uploads, a transcoding pipeline, adaptive streaming, and CDN delivery, along with the costs that shape the design.
Lessons
- 01Set the video workloadSeparate publishing from watching, then size the expensive paths before choosing services.
- 02Accept an upload safelyLet the API authorize an upload while object storage receives the large bytes directly.
- 03Process video off the request pathUse a queued task graph so independent work runs in parallel and failed tasks can retry.
- 04Make one source fit many screensProduce compatible renditions and short segments so a player can adapt quality.
- 05Publish only a playable videoKeep queryable metadata separate from media bytes and make state changes explicit.
- 06Deliver segments near the viewerThe API answers who may watch; the CDN serves media; the player manages buffer and quality.
- 07Spend capacity where demand isMeasure popularity and egress before expanding every rendition and region.
- 08Plan for failure and removalDefine recovery, observability, and policy enforcement across upload, processing, and playback.