Upload path (asynchronous)
- Client gets a pre-signed URL and uploads the raw file directly to blob storage.
- An event triggers the transcoding pipeline - a queue plus a worker fleet that splits the video into segments and encodes each into multiple resolutions and bitrates in parallel. This is the expensive part and it is why upload must be async.
- Outputs are written as chunked segments plus a manifest (HLS or DASH), pushed to the CDN, and the metadata service marks the video ready.
Playback path (read, and where the scale is)
- Client requests metadata from the API, then fetches the manifest.
- The player requests segments directly from the CDN, choosing bitrate adaptively based on measured bandwidth. Origin servers never serve video bytes.
Supporting services: metadata (relational), search index, recommendations (offline-computed), view counts (streamed and aggregated, not incremented per view), comments.
The numbers that justify the shape: video egress dominates everything - a single 1080p stream is about 5 Mbps, so 1 million concurrent viewers is about 5 Tbps. No origin fleet can serve that, which is why over 95% of traffic must be CDN-served. Say this out loud, because it is the reason the diagram looks the way it does.