connectionsmanager
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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>

Readme

Keywords

none

Package Sidebar

Install

npm i connectionsmanager

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

8.1 kB

Total Files

10

Last publish

Collaborators

  • shashankmishra55