Design a video streaming service (like YouTube or Netflix)
Creators upload videos, and viewers press play on phones, laptops and TVs and get a picture within a couple of seconds that keeps playing as their connection changes. It's a film showing in a cinema near every viewer, where each starts it whenever she likes and the picture softens, rather than stops, when her connection weakens.
It's also asked as "design YouTube", "design Netflix" or "design TikTok". This page is YouTube-shaped, with uploads from anyone; Netflix differs on the upload side, which a follow-up covers, and plays the same way. Interviewers like it because one question holds a slow pipeline and a huge read path. Its closest case study is Photo sharing, which uploads smaller files the same way.
Below is a full mock interview following the seven steps of the framework. You're the candidate: at each Guess before you read on, stop and answer first.
Step 1 · Clarify the features and cut the scope
Minutes 0–5 · How this step works
Interviewer: Design a video streaming service, like YouTube.
You: A few questions first. Is it both sides, creators uploading and viewers watching?
Interviewer: Both. Creators upload from phones and computers, and viewers watch on anything.
You: How long can a video be, and what quality do we offer?
Interviewer: Up to 12 hours or 256 GB, as on YouTube. 1080p for everyone, 4K where the source has it.
You: Search, recommendations, comments, likes?
Interviewer: Assume they exist. The home page shows recommended videos from another team's service.
You: Then I'll cover upload, processing into streamable formats, playback that adapts to the network, and takedowns. Out: live, search, comments, ads and recommendations themselves. OK?
Interviewer: Good.
Each answer shapes the design: big uploads mean parts sent straight to storage, 12-hour videos mean processing in pieces, and takedowns mean every cached copy must stop.
Step 2 · Non-functional requirements
Minutes 5–8 · How this step works
You: Say a billion plays a day and half a million uploads a day. Playback should start within 2 seconds for 99% of plays on a decent connection, and stall less than 1% of watch time. Playback is 99.99% available, about 4.3 minutes a month, and uploading 99.9%. An uploaded video is never lost, though one finished in the last ~15 minutes before a region loss waits for that region. A 10-minute video should play within 5 minutes of its upload finishing for 99% of uploads. A taken-down video stops for new viewers within a minute and for everyone within an hour.