How would you design a video streaming service like Netflix?

Why Interviewers Ask This

Advanced questions like this reveal whether a candidate has internalized System Design deeply enough to make architectural decisions. Strong answers demonstrate both breadth and depth of experience.

Answer

Designing Netflix-scale video streaming involves video processing, CDN, recommendations, and massive scale. Video ingestion pipeline: content team uploads source video → transcoding pipeline converts to multiple formats and resolutions (4K, 1080p, 720p, 480p) × multiple codecs (H.264, H.265/HEVC, AV1) × multiple bitrates (adaptive bitrate streaming) → stored in S3. HEVC/AV1 reduce bandwidth ~50% vs H.264. Adaptive Bitrate Streaming (ABR): video divided into small segments (2-10 seconds each). Player requests an HLS/DASH manifest → selects appropriate bitrate segment based on current bandwidth → if bandwidth drops, switches to lower bitrate seamlessly. This prevents buffering. CDN strategy: Netflix built its own CDN (Open Connect) — deploys servers inside ISP datacenters. The most popular content is pushed to edge servers (proactively cached). ~95% of traffic served from edge. Off-peak hours: pre-position popular content to edge nodes worldwide. Recommendation system: collaborative filtering (users who watched X also watched Y) + content-based filtering + A/B tested ML models. Offline training on Hadoop, online serving via low-latency model serving infrastructure. Database: user data, profiles → MySQL (sharded); viewing history → Cassandra; search → Elasticsearch; real-time events → Kafka → Spark Streaming → updates to all systems. Microservices: hundreds of microservices — each team deploys independently. Chaos Monkey intentionally kills services to test resilience. Multi-region: active-active in multiple AWS regions for global availability.

Common Mistake

Many candidates answer correctly but can't explain the 'why'. Always be prepared to justify your answer with a concrete example or use case from your System Design experience.