Code RoomMulti-device session management
MediumPrep Room Coding #3350

Multi-device session management

System designConcurrencyDistributed systemsMid–Senior~35 min

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.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.