Design Live Video Streaming Service in 45 Minutes: System Design Interview Guide
Step-by-step system design walkthrough for a live streaming platform like Twitch/YouTube Live. Covers ingest (RTMP), transcoding, HLS delivery, chat, CDN, scaling, and reliability patterns.
Here is the detailed system design for a Live Video Streaming Platform (like Facebook Live, YouTube Live, or Twitch).
1. Problem definition and scope
We are designing a large-scale live streaming platform where users can broadcast video in real-time to a global audience. The system needs to handle video ingestion from content creators, process that video into different formats, and deliver it efficiently to millions of viewers.
Main User Groups:
Broadcasters: Users streaming video (via mobile or desktop software like OBS).
Viewers: Users watching the live stream and interacting via chat.
Scope:
We will focus on the Live Video pipeline: Ingestion (RTMP), Transcoding, and Delivery (HLS/DASH).
We will include basic Live Chat and Real-time Viewer Counts.
Out of Scope:
Video on Demand (VOD) playback after the live event ends.
Monetization (Ads, Super Chats).
Complex recommendation algorithms.
2. Clarify functional requirements
Must Have:
Broadcasting: Users can start a live stream using a unique stream key.
Playback: Viewers can watch streams with acceptable latency (10–30 seconds) and minimal buffering.
Adaptive Bitrate (ABR): The system automatically serves different qualities (e.g., 360p, 720p, 1080p) based on the viewer’s internet speed.
Recording: The stream is automatically saved for later viewing once it ends.
Chat: Viewers can send and receive messages in real-time.
Nice to Have:
Viewer Count: Real-time counter of concurrent viewers.
Reaction Overlays: Floating hearts or likes on the video.
3. Clarify non-functional requirements
Scale:
DAU: 50 million.
Peak Concurrent Viewers: 5 million total.
Peak Concurrent Broadcasters: 50,000.
Single Stream Peak: Up to 1 million viewers on a single viral stream.
Latency:
Targeting 10–30 seconds (Standard HLS).
We are not targeting sub-second latency (like Zoom/WebRTC) as it is prohibitively expensive for millions of viewers.
Availability: 99.99%. Streams should not drop during broadcast.
Read/Write Ratio: Extremely read-heavy. (1 broadcaster writes : 100,000 viewers read).






