System Design Masterclass
Streamingstreamingsession-managementdistributed-systemsreal-timeenforcementintermediate

Design Netflix Screen Concurrency Limits

Design a system to enforce streaming concurrency limits

200M+ subscribers, Millions concurrent streams|Similar to Netflix, Disney+, HBO Max, Spotify, Xbox Game Pass|45 min read

Summary

Design a system that enforces how many devices can stream simultaneously on a single account (e.g., Netflix Basic allows 1 screen, Premium allows 4). The core challenge is tracking active streams across globally distributed edge servers in real-time while not degrading the streaming experience. This is asked at streaming companies, gaming platforms, and any service with concurrent usage limits.

Key Takeaways

Core Problem

This is a distributed session counting problem with real-time enforcement. Unlike rate limiting (requests/time), we are tracking concurrent active sessions.

The Hard Part

Detecting when a stream ends is harder than detecting when it starts. Users close laptops, lose internet, or apps crash - no clean goodbye signal.

Scaling Axis

Scale by partitioning on account_id. All sessions for one account should route to the same partition for accurate counting.

The Question: Design a system that enforces concurrent streaming limits for a service like Netflix, where different subscription tiers allow different numbers of simultaneous streams.

Business Context: - Basic Plan: 1 simultaneous stream - Standard Plan: 2 simultaneous streams - Premium Plan: 4 simultaneous streams

Why This Matters: - Revenue Protection: Prevents password sharing abuse (one account, unlimited users) - Capacity Planning: Limits help predict infrastructure needs - Tiered Monetization: Drives upgrades to higher-tier plans - Licensing Compliance: Content licenses often specify concurrent viewer limits

What to say first

Before I design, I want to clarify: what defines an active stream? Is it when the video starts playing, or when the user opens the app? And how quickly must we detect when a stream ends?

Hidden requirements interviewers test: - Do you understand the difference between request rate limiting and session concurrency? - Can you handle the messy reality of detecting stream end (crashes, network loss)? - Do you consider the user experience when enforcing limits? - Can you design for global scale with regional edge servers?

Premium Content

Sign in to access this content or upgrade for full access.