← Back to All Questions
Hard~75 minStreaming & Video

Design Netflix/Hotstar - OTT Streaming Platform

NetflixDisney+ HotstarAmazon Prime VideoHBO MaxApple TV+Spotify

📝 Problem Description

Design a subscription-based video streaming platform like Netflix or Hotstar. The system should support content catalog management, personalized recommendations, adaptive bitrate streaming, multi-device playback with screen limits, offline downloads, geo-restrictions, and handle millions of concurrent viewers during peak events (like live sports on Hotstar).

👤 Use Cases

1.
User wants to browses content catalog so that sees personalized recommendations by genre/category
2.
User wants to searches for a movie so that finds relevant content with metadata
3.
User wants to plays a video so that stream starts with minimal buffering, adaptive quality
4.
User wants to resumes watching so that playback starts from last watched position
5.
User wants to downloads for offline viewing so that content available without internet
6.
User wants to switches device while watching so that seamless handoff with sync
7.
User wants to exceeds screen limit so that prompted to stop other stream
8.
System wants to handles live sports event so that serves millions of concurrent viewers
9.
Admin wants to adds geo-restriction so that content blocked in specific regions

✅ Functional Requirements

  • Content catalog with movies, TV shows, live sports
  • User profiles within a single account
  • Personalized recommendations and "Continue Watching"
  • Search with filters (genre, year, language, rating)
  • Adaptive bitrate streaming (144p to 4K HDR)
  • Offline downloads with DRM protection
  • Multi-device playback with screen limits (1-4 screens)
  • Parental controls and content ratings
  • Watchlist/My List functionality
  • Subtitles and multiple audio tracks
  • Live streaming for sports/events
  • Subscription management and billing

⚡ Non-Functional Requirements

  • Video start time < 2 seconds
  • Rebuffer rate < 0.5%
  • Support 200M subscribers, 100M DAU
  • Handle 10M concurrent viewers during peak events
  • 99.99% availability
  • Global latency < 200ms for API calls
  • Support 4K HDR at 25 Mbps
  • Offline content available for 30 days

⚠️ Constraints & Assumptions

  • Content must be DRM-protected (Widevine, FairPlay, PlayReady)
  • Geo-restrictions based on licensing agreements
  • Screen limits enforced in real-time
  • Offline downloads expire after license period
  • Live content has 5-30 second delay from broadcast
  • Must support smart TVs, mobile, web, gaming consoles

📊 Capacity Estimation

👥 Users
200M subscribers, 100M DAU, 10M concurrent peak
💾 Storage
100PB for content (10K titles × 10GB × 6 profiles)
⚡ QPS
API: 1M/sec, Stream starts: 50K/sec
🌐 Bandwidth
50+ Tbps global egress during peak
📐 Assumptions
  • 200M subscribers globally
  • 100M daily active users
  • Average 2 hours watch time per day
  • 10K titles in catalog (movies + series)
  • Each title: 10GB average across all profiles
  • Peak concurrent during major events: 10M
  • Live sports: 25M viewers for major matches

💡 Key Concepts

CRITICAL
Adaptive Bitrate Streaming (ABR)
HLS/DASH protocols deliver video in small segments at multiple quality levels. Player dynamically switches quality based on network conditions.
CRITICAL
DRM (Digital Rights Management)
Encrypt content with Widevine (Android/Chrome), FairPlay (Apple), PlayReady (Windows). License server issues decryption keys.
HIGH
Open Connect
Netflix's custom CDN with appliances deployed in ISPs. Content pre-positioned overnight. Reduces internet backbone traffic.
HIGH
Screen Limit Enforcement
Real-time tracking of active streams per account. Heartbeat mechanism with Redis. Force stop stale sessions.
HIGH
Personalization
ML models rank content per user. Collaborative filtering + content-based. A/B test thumbnails and rows.
MEDIUM
Offline Playback
Download encrypted content with temporary license. License expires after 48 hours of offline. Requires periodic online check.
MEDIUM
Low-Latency Live
CMAF with chunked transfer encoding. Sub-5-second latency for live sports. Requires different CDN configuration.

💡 Interview Tips

  • 💡Start by clarifying VOD vs Live streaming requirements
  • 💡Discuss DRM early - it's a key differentiator from YouTube
  • 💡Explain screen limit enforcement with Redis (common interview question)
  • 💡Draw the CDN architecture with Open Connect concept
  • 💡Cover both personalization and trending/popular algorithms
  • 💡Mention geo-restrictions and licensing complexity
  • 💡Discuss live event scaling (10x normal traffic)
  • 💡Address offline downloads with license expiration