Design a Video Sharing Platform
Design a YouTube-like service: creators upload videos; the platform transcodes them into multiple bitrates, stores them across tiers, and delivers them through a CDN; viewers search, watch, like and comment; and a recommendations interface feeds the home page.
Assume 100M daily viewers watching ~25 minutes a day and ~1M uploads a day averaging 100 MB.
Cover: traffic and storage estimates; the ingestion pipeline from upload to playable, including thumbnails; the storage tiers; delivery, caching and adaptive bitrate; metadata, search indexing and engagement counters; the contract with the recommendation system; rate limiting; multi-region availability; encryption and DRM; and the cost trade-offs you would actually pull on.
Hints
Hint 1
Estimate egress before anything else: 100M viewers × 25 minutes × a few megabits per second is tens of petabytes a day. Delivery cost dwarfs storage and compute, so CDN hit ratio and codec efficiency are first-order design decisions.
Hint 2
Model ingestion as a workflow of idempotent tasks: split the source into segments, transcode segments in parallel per rendition, package, then publish. Make the video playable at a low rendition first and add the rest later.
Hint 3
Views, likes and search are asynchronous by design: events go to a log, counters are aggregated off the request path, and the search index is fed by change data capture from the metadata store.
Asked at
Sign in to talk to the interviewer — ask what's in scope, what scale to design for, or for a nudge when you're stuck. Conversations save to your account.