How do "zero-downtime deploys" work with Websockets exactly?

Hey, I have a question regarding zero-downtime deploys, and how they work with Websockets.

I have a web service (a game server) which needs to be running all the time.

As far as I understand from this page, whenever a new instance of a web service is deployed, the old instance is kept alive for around 15 minutes, until it is killed with a SIGTERM signal.

My question is: Does that mean that any client (Websocket) still connected to that (old) instance of my web service gets disconnected after 15 minutes (or at some point)? Or do these clients (from the old instance) transition to the new instance of my web service somehow, without them getting disconnected?

Thanks in advance!
Muri

1 Like

I have exactly the same question. Is there any way to allow me write shell script to do blue green deployment for stateful app (a game server with websocket clients)? Thanks

I just tested this, and yes, it seems that when the previous instance gets terminated, every client connected to that instance gets disconnected automatically. Probably need to implement a reconnect feature for such case.

Socket IO, or any other library, should make the reconnection work easily i think.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.