Project 18
Video streaming platform
Media processing, CDN delivery
Brief
Video on demand: creators upload; the platform transcodes to multiple qualities; viewers stream with adaptive bitrate worldwide; views, metadata, thumbnails.
Targets
10k uploads/hour · 1M concurrent viewers · start time p99 < 2 s · smooth playback on variable bandwidth · a 10-minute video transcoded in < 5 minutes · CDN offload > 95%.
Must cover
- Transcoding pipeline as a batch workflow with retries (→ 123).
- CDN delivery — pull caching per segment, origin shielding (→ 89).
- Adaptive bitrate with HLS (RFC 8216) and MPEG-DASH — segmented renditions, client-side switching (P).
- Signed URLs for access control on media (P; → 79, 164).
Design challenges
- Transcoding pipeline (→ 123, 121): upload → queue → parallel transcode per rendition and segment → package (segments plus manifests) — with retries and progress tracking.
- Adaptive bitrate mechanics: why segmentation is exactly what makes CDN caching work (→ 89).
- CDN strategy (→ 89): object-storage origin; the long tail of rarely watched videos vs. viral hot segments (→ 88).
- Resumable multi-gigabyte uploads direct to object storage with signed URLs (→ 79).
- View counting at 1M concurrent: approximate live, reconciled later (→ 141 — ahead, Part 8; analytics → 214).
- Metadata, search, and thumbnails as conventional subsystems beside the media path (reuse Projects 5 and 13).
Out of scope
Live streaming (a different latency domain), DRM internals, recommendations (→ 216).