Design Video Streaming Platform

Video streaming platform inspired by Netflix's published engineering: chunked per-title encoding, playback manifests steering players to CDN servers inside ISPs, off-peak pre-positioning of popular titles, DRM licenses, and viewing history powering 'continue watching' and personalized rows. A teaching design.

Functional requirements

  • Upload VOD content via web/API with resumable transfers.
  • Transcode uploads into multiple renditions (bitrate/resolution/codecs) and package into HLS/DASH.
  • Serve manifests and segments globally via CDN with tokenized/signed access.
  • Support DRM (e.g., Widevine/FairPlay/PlayReady) with license issuance and key rotation.
  • Provide live streaming ingest (RTMP/SRT) with near real-time segmenting and ABR manifests.
  • Store and deliver subtitles/captions and thumbnails/preview sprites.
  • Playback analytics collection — startup time, rebuffer ratio, bitrate switches, errors.
  • Search/browse catalog by title, genre, and availability; personalized recommendations.
  • Geo-blocking, entitlement checks, and availability windows per asset.
  • Multi-device playback support across web, mobile, and TV apps.

Non-functional requirements

  • Availability: 99.99% platform uptime; live events must remain available during a single-AZ failure.
  • Performance: initial playback start < 2 s p95; segment delivery < 150 ms p95 from edge; license issuance < 200 ms p95.
  • Scalability: support millions of concurrent viewers and petabyte-scale libraries.
  • Durability: source media and renditions stored with 11-nines durability in multi-AZ object storage.
  • Consistency: strong for entitlements and license issuance; eventual (< 30 s) for analytics and catalog search indexing.
  • Security: TLS in transit; signed URLs/cookies for CDN; DRM keys protected by KMS; principle of least privilege.
  • Resilience: circuit breakers/timeouts; retries with backoff; DLQs for failed jobs; blue/green or canary deployments.
  • Observability: traces/logs/metrics for ingest, packaging, origin, CDN hit ratio, and license latency.
  • Cost: storage tiering for cold content; CDN offload targets > 90% hit ratio.

How the design evolves

Stage 1: One Server Streaming Files from Disk

See why serving video from a server's disk in one quality can't work.

What was missing: Nothing yet.

Why that's risky: Evening traffic needs terabits per second that no server or data centre link can provide, one quality stalls on slow connections, and every stream crosses the internet.

What gets added: One server that accepts uploaded files and streams them to members in a single quality.

Trade-offs: Simple, but video bandwidth dwarfs everything else.

Stage 2: Ingest and Per-Title Chunked Encoding

Turn each studio master into renditions for every device and network, quickly.

What was missing: One file, one quality.

Why that's risky: Segments are still served from our own storage through our servers, far from members.

What gets added: An ingest service that receives and verifies masters, chunked encoders that encode chunks in parallel with a bitrate ladder tuned per title, packaged into short segments in media storage, and a catalog database.

Trade-offs: Per-title encoding costs more compute up front but saves bandwidth on every view.

Stage 3: Playback Manifests and a CDN Inside ISPs

Serve video bytes from servers next to members.

What was missing: Video bytes came from our data centres.

Why that's risky: Edge servers fill on demand, so the first viewers of a new release in each region pull from origin at peak time.

What gets added: A playback service that returns a manifest listing renditions and the best nearby CDN servers for the device and network, a manifest cache, and CDN servers placed inside internet providers' networks.

Trade-offs: Placing servers inside ISPs needs partnerships, but removes most traffic from the public internet.

Stage 4: Pre-positioning Popular Titles Off-Peak

Have tomorrow's popular titles on the edge before anyone presses play.

What was missing: Edges filled on demand at peak time.

Why that's risky: Anyone with a segment URL could play it: content isn't protected by DRM or entitlement checks.

What gets added: A viewing event stream and a fill worker that predicts popular titles per region and copies their segments onto edge servers during off-peak hours.

Trade-offs: Predictions waste some edge space on titles that turn out less popular.

Stage 5: DRM Licenses and Entitlements

Only paying members on allowed devices and regions can play.

What was missing: Segments weren't protected.

Why that's risky: Members can't resume where they stopped, the home page isn't personalized, and quality of experience isn't measured.

What gets added: Segments are encrypted, and a license service issues short-lived DRM licenses after checking the member's plan, device and region in the entitlements database.

Trade-offs: License checks add a step at start-up; licenses are cached on the device for the session.

Stage 6: Continue Watching, Personalized Home and QoE Monitoring

Bring members back to what they want to watch, and watch streaming quality per ISP.

What was missing: No viewing history, a generic home page, and no quality monitoring.

Why that's risky: Remaining risk is regional: control-plane services must fail over between regions while edges keep streaming.

What gets added: A history writer recording what members watched and where they stopped, a recommendation builder precomputing personalized rows, a home page service reading them, and QoE monitoring of start-up time, rebuffering and bitrate per internet provider.

Trade-offs: Rows are refreshed a few times a day rather than per click.

Frequently asked questions

How do you minimize playback startup time?

Use a CDN with pre-warmed caches for hot content, cache manifests/entitlements, and prioritize delivering the first few segments from the closest edge. Keep manifests small and enable HTTP/2 or HTTP/3 for parallel fetches.

How do you design the transcoding pipeline for scale?

Produce jobs per rendition and codec to a queue; workers autoscale with queue depth. Ensure idempotent outputs using deterministic keys. Use spot/low-cost instances as workers with checkpointing for long encodes, and store artifacts in object storage.

How do you secure content while keeping playback snappy?

Use DRM with short-lived licenses, signed URLs/cookies on the CDN, and entitlement checks cached for seconds. Keys stay in a KMS; services use least-privilege to request decryption operations.

How do you collect and process playback analytics at scale?

Send client-side playback events to an ingestion endpoint that writes to a durable queue. Batch-process with workers to aggregate QoE metrics and store rollups for dashboards and alerting.

PRISM
System Design Interview
Round 1 of 4 · Architecture Design · 60:00 remaining
PRISM logo PRISM logo
Problems
AI Interview
Interview Challenges
Build & Stress Test NEW
System Architectures
Design & Fix NEW
Interactive Roadmap
System Design Guides Interview Prep Guide
Problems
Today's mission
Notifications
    Theme
    Pricing Community NEW Send feedback Report a problem NEW
    Sign in
    Theme
    Community NEW Send feedback Report a problem NEW
    All problems
    Phase
    Build & Stress Test
    Phase 01: Thinking in Systems
    Upcoming

    Components

    User
    CDN
    Load Balancer
    Server
    Cache
    Database
    Blob Storage
    Search Index
    Queue
    Worker
    Rate Limiter
    Service
    API Gateway
    Reverse Proxy
    WebSocket Server
    Third-party API

    Inspector

    Notes
    Use clear names so your design intent is easy to understand.
    Good
    Name by business meaning
    "Order API", "Restaurant Service"
    Avoid
    Generic names = zero signal
    "Server 1", "API", "Queue"
    A short description for each component makes feedback much better.
    100%
    Start by identifying:
    • Users & entry points
    • APIs & services
    • Databases & storage
    • Traffic flow & scale

    Round 1 of 4 Architecture Design

    Run a simulation to see results.

    Time Remaining
    60:00
    System Design Interview

    What are the core functional requirements?
    What are the key non-functional constraints?

    Questions

    Start Evaluation to unlock questions.

    EVALUATE MODE

    Test yourself like it's the real thing.

    A structured 4-module evaluation that mirrors how top companies assess system design candidates.

    Architecture Design
    Draw your system on the canvas. Define components, connections, and data flow.
    FR & NFR Requirements
    Answer functional and non-functional requirement questions about your design.
    MCQ Round
    Multiple choice questions testing your depth on the chosen system.
    Tradeoff Analysis
    Justify your design decisions and defend your architectural tradeoffs.
    AI Report Generated
    Choose a Problem
    No problem selected
    • 30 min
    • 45 min
    • 60 min
    Round 2 of 4
    MCQ Round
    Answer multiple-choice questions based on your design.

    Exit Interview?

    You're in the middle of an interview session. Leaving now will end your current attempt.

    Your progress will be saved.

    Open a saved design

    Select a design to load into the canvas.

    My Evaluations

    Your past evaluation sessions

    Here’s a simple request flow that follows the expected layer order.

    External User
    →
    Edge CDN → API Gateway → Load Balancer
    →
    Compute App Servers / Services
    →
    DataAccess Cache
    →
    Storage Database / Search Index
    →
    Async Queue → Worker

    Tip: keep arrows moving forward through layers (Edge → Compute → Storage). Avoid sending storage back to compute.

    Evaluation Instructions

    Read the rules carefully before starting. The test auto-submits on refresh.

    Before you start

    • Build your architecture on the canvas. The timer starts when you click Start Evaluation.
    • Don't forget to answer Functional Requirement and Non Functional Requirements.
    • When satisfied with your design, click Next to lock it and view the questions.
    • Please answer final step questions to complete the evaluation.

    Dos

    • Do read each question carefully before answering.
    • Do include required components to maximize component coverage.
    • Do save a copy of your design if you want to keep it before submission.

    Don'ts

    • Don't refresh or close the tab during an active evaluation — this will auto-submit your answers.
    • Don't switch app modes or open another tab while the evaluation is running.
    • Don't attempt to edit the design after clicking Next; the workspace will be locked.

    All the best!!

    Confirm

    Input

    Notice

    Evaluation Report
    Report a problem

    Evaluation Complete

    Generating Your Report

    Hang tight — our AI is evaluating your design…

    Did you know?

    Loading…

    Share feedback

    Tell us what worked well and what we can improve.

    Let's personalize this

    Answer a couple of quick questions so we can tailor your journey and missions.

    Your welcome gift: of Full PRISM Access

    Your Pro access starts as soon as you press Start my journey.

    SYSTEM BRIEF

    System Constraints

    What the system must do — every item is a user-facing behaviour your architecture must support.

      ↑ Engineering Constraints

      These are the failure modes you must design against — latency SLAs, durability targets, traffic ceilings.

        ⇆ Architecture Constraints

        Core Concepts to Master

        Your Journey
        PHASE – –
        0 / 0 0%
        0
        Mock Interview Checklist

        Pick a topic to start

        Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.

        Phase Mastered

        You've conquered this phase. These are the skills you now own:

          +500 XP

          Company Interview Paths

          Progress Summary