Practice: Design Video Streaming Platform
On-demand and live video streaming platform with ingest, transcoding, DRM licensing, CDN delivery, ABR manifests, and playback analytics.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Upload VOD content via web/API with resumable transfers.
- Transcode uploads into multiple renditions (bitrate/resolution/codecs) and package into HLS/DASH.
- Serve manifests and segments globally via CDN with tokenized/signed access.
- Support DRM (e.g., Widevine/FairPlay/PlayReady) with license issuance and key rotation.
- Provide live streaming ingest (RTMP/SRT) with near real-time segmenting and ABR manifests.
- Store and deliver subtitles/captions and thumbnails/preview sprites.
- Playback analytics collection — startup time, rebuffer ratio, bitrate switches, errors.
- Search/browse catalog by title, genre, and availability; personalized recommendations.
- Geo-blocking, entitlement checks, and availability windows per asset.
- Multi-device playback support across web, mobile, and TV apps.
Non-functional requirements
- Availability: 99.99% platform uptime; live events must remain available during a single-AZ failure.
- Performance: initial playback start < 2 s p95; segment delivery < 150 ms p95 from edge; license issuance < 200 ms p95.
- Scalability: support millions of concurrent viewers and petabyte-scale libraries.
- Durability: source media and renditions stored with 11-nines durability in multi-AZ object storage.
- Consistency: strong for entitlements and license issuance; eventual (< 30 s) for analytics and catalog search indexing.
- Security: TLS in transit; signed URLs/cookies for CDN; DRM keys protected by KMS; principle of least privilege.
- Resilience: circuit breakers/timeouts; retries with backoff; DLQs for failed jobs; blue/green or canary deployments.
- Observability: traces/logs/metrics for ingest, packaging, origin, CDN hit ratio, and license latency.
- Cost: storage tiering for cold content; CDN offload targets > 90% hit ratio.