Katkat

Design a video-on-demand streaming service

RokuSoftware Engineer · Onsite

Last updated

This problem tests your ability to design a distributed video-on-demand platform, focusing on content ingestion, delivery at scale, and media processing pipelines.

Problem Statement

Design a video-on-demand (VOD) streaming service similar to Netflix or Roku Channel. The system must support millions of concurrent users, provide low-latency playback, and handle content ingestion from content providers.

Functional Requirements

  • Users can browse a catalog and play videos.
  • Content providers can upload raw video files.
  • The system must ensure smooth playback across varying network conditions.

Non-Functional Requirements

  • High availability and scalability.
  • Low latency for video start times (time-to-first-frame).
  • High throughput for concurrent video streams.

Scope

Your response should cover:

  1. High-level architecture: How components interact (Ingestion, Transcoding, Storage, Delivery).
  2. Content Processing: The pipeline from raw upload to streamable segments.
  3. Delivery Strategy: How to optimize playback performance globally.
  4. Data Modeling: How to store metadata and user interaction data.
  5. Trade-offs: Choices regarding consistency vs. availability or storage vs. compute.

Hints

Hint 1

Consider how adaptive bitrate streaming (e.g., HLS or DASH) breaks down large video files to improve performance.

Hint 2

Think about the role of a Content Delivery Network (CDN) and how you would manage cache invalidation or region-based routing.

Hint 3

Design an asynchronous worker-based architecture to handle the computationally intensive process of video transcoding.

Follow-up questions

  • How would you handle a sudden viral spike in traffic for a newly released blockbuster movie?
  • How would you design a recommendation service to suggest content to users based on their watch history?
  • What metrics would you monitor to ensure the quality of experience (QoE) for users, such as buffering frequency or startup time?