connectionsmanager
v1.0.0
Published
The Connection manager is intended to be used as npm module by websocket based game servers for zero downtime deployments.
Downloads
3
Readme
Connection Manager
The Connection manager is intended to be used as npm module by websocket based game servers for zero downtime deployments.
When updating a deployment in kubernetes, old pods are killed and new pods with updated template are created. The deletion of old pods causes connection break in websocket based games, which results in downtime in deployments.
This module keeps old pods from being killed as long as there is a game room present in the container, i.e., a game is going on. As soon as the last game room is destroyed, the container kills itself.
For this module to work, please apply this configuration in the game server's deployment yaml:
kind: Deployment spec: ... template: ... spec: ... containers: ... - lifecycle: preStop: httpGet: path: prestopz port: terminationGracePeriodSeconds: <bit_more_than_max-game-time>