Design a Netflix-like streaming platform
HubSpotSoftware Engineer · OnsiteLast updated
A HubSpot software-engineer onsite system-design question: design a Netflix-like video streaming platform covering catalog browse by genre and curated rails (Recently Added, Top Ten), search, adaptive-bitrate playback across web, mobile and TV, cross-device resume, and an upload-to-streamable ingest pipeline. It evaluates service decomposition, data models and API contracts, transcoding and CMAF/multi-DRM packaging, CDN and caching strategy, session concurrency and consistency, multi-region failover, observability and A/B testing, graceful degradation, and cost control at millions of concurrent viewers. The worked solution sizes egress and heartbeat load, corrects the common concurrency, resume, and cache-TTL mistakes, and marks the MVP cut line.
Question
Design a Netflix-like video streaming platform. Viewers must be able to browse and search a catalog, stream titles with adaptive bitrate (ABR) across web, iOS, Android, and smart TV, and resume playback where they left off across sessions and devices. Content providers (studios, plus user-generated uploads) must be able to upload a video that becomes streamable after processing.
Assumptions you may refine: ~50M DAU with a peak of ~5M concurrent streams; global audience with multi-region deployment; source masters of 1-10 GB producing multiple encoded renditions. Non-functional goals: low startup latency, smooth playback, global availability, fault tolerance, observability, and content protection (at minimum tokenized URLs, plus DRM for licensed content). Be explicit about what you would cut for a first MVP (~100k DAU, three use cases: browse, play, resume) and what is non-negotiable at any scale.
Work through the full design and be ready to cover:
- Requirements, scope, and scale assumptions - functional vs non-functional requirements, what is explicitly out of scope, and back-of-the-envelope sizing for egress bandwidth, control-plane QPS, and storage.
- Core use cases - browse the catalog by genre and by curated rails such as "Recently Added" and "Top Ten"; play a video at different resolutions on every device type; resume the last play position across sessions and devices.
- Service decomposition and high-level architecture - ingestion/transcoding, metadata and catalog, search/indexing, recommendations, playback and ABR, auth/session, DRM licensing, CDN, and how the pieces fit together.
- Data models - titles/series/episodes, video assets and the ABR ladder, curated and ranking lists, users/profiles/devices, playback sessions, and watch progress.
- API contracts - client-facing (catalog browse, search, playback start, heartbeat, stop, resume/continue-watching) and uploader-facing (multipart upload, complete, status).
- Video ingestion and transcoding pipeline - master upload and validation/QC, the ABR ladder decision, HLS/DASH packaging over CMAF, thumbnails and subtitles, DRM packaging, and how a title flips to "ready".
- Search, indexing, and recommendations - full-text search over title/tags/cast with faceting and typo tolerance, index freshness, personalized rows, and cold start for a brand-new profile.
- Adaptive bitrate streaming and DRM - ABR ladder and segment sizing, HLS/DASH packaging over a shared CMAF segment set, multi-DRM (Widevine/FairPlay/PlayReady) with CENC, signed/tokenized URLs, and per-device player support and fallback.
- Auth, profiles, and entitlements - sign-in and sessions, TV device pairing, multiple profiles per account, maturity ratings and parental controls, regional licensing windows, and per-account concurrent-stream limits.
- Playback session management and resume - session lifecycle, heartbeats and debounced progress writes, atomic concurrency enforcement, and how resume is restored and conflicts resolved across devices.
- "Recently Added" and "Top Ten" - how to define, compute, materialize, and serve these rails, with a small worked ranking example.
- Storage, CDN, and caching - object storage vs SQL vs NoSQL choices, geo-replication, multi-CDN and origin shield, manifest vs segment TTLs, and cold starts / cache warming for fast time-to-first-frame.
- Scalability, availability, and consistency - partitioning, autoscaling, SLOs and capacity targets at peak concurrency, multi-region topology and failover, and the consistency strategy for catalog, entitlements, rankings, and resume state.
- Observability, experimentation, and failure handling - QoE and backend metrics, tracing, A/B testing with guardrails, and graceful degradation (CDN fallback, origin/license failover, partial catalog outage, transcode backlog, write failures).
- Security, abuse prevention, and cost optimization - rate limiting, signed-URL rotation, anti-piracy and watermarking, credential-sharing detection, and the levers that control egress and encoding spend at millions of concurrent viewers.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.