Stateful vs. Stateless Scaling for WebSocket Backends: Where's the Line?
Maria Johnson
·6 views
I've been thinking a lot about the trade-offs in scaling WebSocket applications, particularly around managing connection state. When you're aiming for a million concurrent users, it feels like the traditional 'stateless services' mantra gets really complicated. For WebSockets, the connection itself is stateful by nature. So, when do you push state into an external store (like Redis), and when do you try to keep some affinity with the application instance itself for performance? Is there a point where the overhead of external state management starts to outweigh the benefits of simpler load balancing? Or is externalizing all state always the way to go for extreme scale? Curious to hear how others approach this balance in practice.
0 comments