EXPERT

Design Netflix Video Streaming Platform

Design a global video streaming platform that serves millions of concurrent users with personalized recommendations and adaptive bitrate streaming.

Estimated Time: 45 minutes
#streaming#cdn#video#recommendations#microservices
Solution Overview

Netflix architecture includes: (1) CDN with edge servers, (2) Adaptive bitrate encoding (ABR), (3) Recommendation engine, (4) Microservices for each domain, (5) Chaos engineering for resilience.

Hints to Get Started
1

Think about video encoding tradeoffs

2

Consider CDN placement strategy

3

How to handle peak traffic (Friday nights)?

Requirements

functional

  • Upload and encode videos
  • Stream video with adaptive quality
  • Personalized recommendations
  • Continue watching
  • Multi-device sync
  • Search and browse catalog

non functional

  • Support 200M+ concurrent streams
  • Global availability
  • < 2 second startup time
  • 99.99% uptime
System Architecture Diagram

Architecture diagram visualization

(Diagram generation coming soon)

cdn strategy

caching

Predictive pre-caching of popular content

approach

95% of traffic served from within ISP networks

benefits

Reduced latency, lower ISP costs

open connect

Netflix's own CDN boxes in ISP datacenters

playback service

multi device

Sync watch state across devices

license service

DRM for content protection

resume watching

Store playback position in database

content ingestion

  • Upload raw video
  • Transcode to multiple formats (H.264, H.265, VP9, AV1)
  • Generate multiple bitrates (4K, 1080p, 720p, 480p)
  • Extract thumbnails and metadata
  • Upload to CDN origin

adaptive streaming

protocol

DASH or HLS

mechanism

Client measures bandwidth, requests appropriate bitrate

switching

Seamless quality changes every 2-10 seconds

manifest file

XML/M3U8 with available quality levels

recommendation engine

signals

  • Watch history
  • Ratings
  • Browse behavior
  • Similar users
  • Time of day
  • Device type

algorithms

  • Collaborative filtering
  • Content-based filtering
  • Deep learning models
  • A/B testing

personalization

Thumbnails, titles, and rankings personalized per user

Scale

users

300M subscribers worldwide

content

100,000+ titles, multiple languages/subtitles

storage

Petabytes of encoded video

bandwidth

15% of global internet traffic

Data Stores

s3

Video files, images

mysql

Billing, subscriptions

redis

Session data, caching

cassandra

User watch history, distributed across regions

elasticsearch

Content search

Microservices
  • User Service
  • Content Service
  • Recommendation Service
  • Encoding Service
  • Playback Service
  • Billing Service
  • Analytics Service