Code Room
System designHard
Question
Design the WebSocket gateway tier that holds 10 million concurrent persistent connections for a real-time app, where any backend service must be able to push a message to a specific user (who may be connected to any of hundreds of gateway nodes, or not connected at all). Connections churn heavily (mobile users dropping in and out), and a deploy of the gateway fleet must not drop everyone at once. How do you route a backend push to the right connection across the fleet, and how do you handle churn and deploys?
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.