Video Streaming Platform
Video Streaming Platform with ingest, transcode, CDN distribution, and adaptive bitrate playback.
Requirements
Functional Requirements
- Upload/live ingest, transcode renditions, playback manifests
- DRM/tokenized playback, QoE collection
Non-functional Requirements
- Low startup delay and rebuffer ratio
- Scalable transcode and origin egress
High-Level Design
- Ingest → transcode → origin → multi-CDN
- QoE events pipeline
Capacity & Sizing
- Concurrent streams, average bitrate, peak egress
- Transcode job rates and profiles
Key Components
- Ingest, Transcoder, Origin, CDN, QoE pipeline
Architecture
High-level components and data flow
Data Model
Core entities and relationships
- assets (
asset_id PK,user_id,status,created_at) - renditions (
asset_id,profile,url) - playbacks (
asset_id,session_id,ts,qoe)
APIs
- POST /api/assets { uploadUrl }
- GET /api/assets/:id
- GET /play/:id.m3u8
Hot Path
- Ingest → transcode → origin → CDN → player
Caching & TTL
- CDN cache manifests/chunks with short TTL; purge on updates
Scaling
- GPU autoscaling for transcode
- Origin shielding and cache control
- Chunked uploads
Trade-offs
- Latency vs quality ladder depth
- Storage cost vs rendition count
- DRM vs playback compatibility
Failure Modes & Mitigations
- Transcode failure → retry and fallback
- CDN outage → multi-CDN
- Playback errors → degrade bitrate
Observability
- SLIs: start time, rebuffer ratio
- CDN hit ratio
- Transcode queue depth