4 ms·
I've scaled websockets before, it isn't that hard. You need to scale up before your servers become overloaded, and basically new connections go north to the ne
by com2kid 2y ago
I've scaled websockets before, it isn't that hard.
You need to scale up before your servers become overloaded, and basically new connections go north to the newly brought up server. It is a different mentality than scaling stateless services but it isn't super duper hard.
- hooli_gan 2y agoCan you suggest some resources to learn more about Websocket scaling? Seems like an interesting topic
- com2kid 2y agoHonestly I just flipped the right bits in the aws load balancer (maintain persistent connections, just the first thing you are told to do when googling aws load balancers and web sockets) and setup the instance scaler to trigger based upon "# open connections / num servers > threshold". Ideally it is based on the rate of incoming connections, but so long as you leave enough headroom when doing the stupid simple scaling rule you should be fine. Just ensure new instances don't take too long to start up.