express-ws
express-ws copied to clipboard
express ws in clustered application
Hello,
I'm facing a problem that forced me to disable clusters until i find a solution. I'm using clusters, and i'm saving web-socket connection objects in an object in memory. The problem occurs when a request fall into another cluster than the one where the connection was opened, then the connection cannot be found. I tried to use a cross-process store so that connections object can be shared between clusters, but the connection object is circular and cannot be serialized. How can i deal with this ?
Thanks
I also have this dilemma.
Websockets behind clusters must have sticky connections
.
That's a concept that load balancers implements to always deliver a client (a connection) to the same host once the initial connection is made.