Upload, transcoding, storage, distribution and cache invalidation for the world's largest video site.
Why the Pipeline Is Staged, Not Atomic — One upload, five stages, each on its own clock: the system does the cheapest thing that works first and invests more only once view count justifies it. (5 min read)
Upload: From an Unreliable Client to a Durable File — A resumable, chunked protocol built on the assumption that the connection will drop, where re-sending bytes the server already has is never acceptable. (4 min read)
Client-Side Upload Mechanics: The File Handle, Not the File — Resuming at a byte offset only works because the client re-reads the original file through a handle on demand; what browsers and mobile apps actually hold, and when that breaks. (7 min read)
Processing: One Source File Becomes Many Derived Assets — The source fans out into independent jobs; transcoding into the bitrate ladder dominates, and expensive codecs are earned by view count rather than applied at upload. (13 min read)
Deep Dive: Parallel Chunked Transcoding — How chunk boundaries are chosen, how hundreds of in-flight chunk jobs are dispatched, tracked and retried, validated, and stitched back into one rendition. (20 min read)
Origin Storage: Where the Durable Copy Lives — One authoritative, durable copy of every rendition in Colossus, deliberately kept off the serving path so that caching can absorb playback traffic. (2 min read)
Global Distribution: Getting Bytes Close to Viewers — Videos are replicated into caches inside viewers' ISPs, and popular objects are treated completely differently from the long tail, so origin almost never sees a viral spike. (4 min read)
Deep Dive: How a Deleted Video Actually Disappears — Invalidation is a different problem from replication: three overlapping layers (authorization at the edge, purges, TTL expiry) and urgency tiers with different guarantees. (10 min read)
Synthesis: How the Stages Interlock — Each stage's guarantee is paid for by another stage's cost: the connections between upload, processing, storage, distribution and playback. (3 min read)
Self-Test — Questions that each connect two or more stages, with full answers, and the central question revisited. (5 min read)