Code Room
System designMedium
Question
Design session management for a consumer streaming service where a user signs in on phones, TVs, laptops, and game consoles — up to 6 concurrent devices per plan — with a 'sign out everywhere' button, a device list a user can manage, and the ability to enforce the concurrent-stream limit in real time. Scale: 300M accounts, sessions are long-lived (months), and a user signing out on one device must be reflected on others quickly. Discuss session storage, how you enforce the concurrency cap, and the read/write pattern.
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.