Menu
Back to Discussions

Scaling WebSocket connections: how do you handle 1M+ concurrent connections?

Nadia Ivanova
Nadia Ivanova
·690 views
we're dealing with a rapidly growing number of websocket connections, currently around 500k concurrent users, and our single websocket gateway is becoming a bottleneck. we're hitting limits on cpu and memory. the challenge is how to horizontally scale this without adding too much complexity to message routing. we need to be able to send targeted messages to specific users. traditional load balancing works for establishing connections, but then how do you find the right server to send a message to a specific user's connection? we're exploring options like using redis pub/sub for message routing or building a custom routing layer. also, the per-connection memory overhead on each server is a concern. what architectural patterns and technologies have you found successful for handling 1m+ concurrent websocket connections reliably?
0 comments

Comments

Sign in to join the conversation.

Loading comments...