One thing I couldn’t get working with websockets is how do you keep websocket connections active during code deployments without disconnecting current connected clients?
Sounds very tricky to me to get right even at scale.
The trick is to make the connection stateless, i.e. any client can connect to any server (just like plain HTTP). Then when there's a new deployment the websocket connection will be terminated and the client can reconnect instantly, automatically finding the next available server.
Sounds very tricky to me to get right even at scale.