📡 You're offline — showing cached content
New version available!
Quick Access
Python Advanced

System Design: Design Netflix-Style Video Streaming

Design a video streaming service for 238M subscribers — transcoding pipeline, adaptive bitrate HLS, CDN architecture, and segment caching.

EzyCoders Admin November 8, 2025 16 min read 0 views
System Design Netflix Video Streaming
Share: Twitter LinkedIn WhatsApp

System Design: Netflix Video Streaming

Netflix serves 238M subscribers with 15+ petabytes of video. This tests CDNs, encoding pipelines, adaptive bitrate streaming, and distributed storage.

Video Upload and Transcoding

Creator uploads raw video (could be 100GB+)
    |
    v S3 Raw Bucket
    |
    v Transcoding Service (FFmpeg workers)
      Encode: 4K (2160p) | 1080p | 720p | 480p | 360p
      Split each quality into 2-second .ts segments
      Generate HLS manifest (.m3u8)
    |
    v Store segments in S3 + CloudFront CDN
    v Notify: video available

Adaptive Bitrate Streaming

Master manifest lists all quality streams:
  #EXT-X-STREAM-INF:BANDWIDTH=15000000,RESOLUTION=1920x1080
  1080p/index.m3u8
  #EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360
  360p/index.m3u8

Player picks quality by bandwidth:
  > 10 Mbps  → 1080p
  3 Mbps     → 720p
  500 Kbps   → 360p
Switches seamlessly at 2-second segment boundaries

CDN Architecture

Netflix Open Connect Appliances (OCA):
  ISP-embedded: servers inside ISPs — fastest, 99% cache hit
  IXP: Internet Exchange Points — regional fallback
  CloudFront: global fallback

Request: User → Nearest OCA → (cache hit) → segment
                              → (miss) → S3 → cache → segment

Q: Why break video into 2-second segments?

Enables adaptive bitrate switching at boundaries, resuming from exact position, parallel download from multiple CDN nodes, independent caching per segment, and DRM per segment. 2 seconds balances seek accuracy against segment overhead.

EzyCoders Admin
Written by
EzyCoders Admin

Team Lead and Full-Stack Developer with experience in PHP, JavaScript, SQL, DSA, and System Design. Passionate about software engineering, scalable web technologies, and helping developers prepare for coding interviews and tech careers through practical tutorials and professional guidance.

Comments (0)

No comments yet. Be the first!

Leave a Comment