Design Facebook Live Video Streaming

Quick Overview

Design a live video streaming system at Facebook's scale. Cover video ingestion, transcoding, CDN distribution, adaptive bitrate streaming, and handling millions of concurrent viewers on a single stream.

Meta
System Design
Software Engineer
Meta
Software Engineer
Onsite
System Design
Hard

0


Design a live video streaming system at Facebook's scale. Cover video ingestion, transcoding, CDN distribution, adaptive bitrate streaming, and handling millions of concurrent viewers on a single stream.

Meta onsite system design rounds favor problems at its own scale, and Facebook Live is a classic because a single stream can draw millions of viewers. The interviewer checks that you can trace the path from broadcaster to viewer and handle transcoding, CDN fan-out, adaptive bitrate and the thundering herd on a hot stream.

What the Interviewer Expects
  • Clarify latency targets, max concurrent viewers per stream and supported devices
  • Design ingestion from broadcaster to edge to origin
  • Transcode into a bitrate ladder and package into short segments
  • Fan out through a CDN with request coalescing for hot streams
  • Explain adaptive bitrate switching on the client
  • Cover live comments and reactions as a separate real-time path
Key Topics to Cover
Video transcoding
CDN
Adaptive bitrate streaming
Request coalescing
Real-time fan-out
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you stop millions of viewers from overwhelming the origin when a stream starts?
  • How would you lower glass-to-glass latency to under two seconds?
  • What happens if the broadcaster's network drops for ten seconds?
  • How would you record the stream for replay after it ends?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional Requirements

  1. Live Video Ingestion: Allow users to stream live video content from various devices (smartphones, webcams, etc.).
  2. Transcoding: Convert incoming video streams ...
Capacity Estimation

Assuming we want to support 10 million concurrent viewers for a single stream:

  • Bitrate Calculation: Average bitrate for HD live streaming ~4 Mbps.
  • Total Bandwidth Requirement: 10 million v...

Submit Your Answer
Markdown supported