Wednesday, 15 August 2018

Socket.io and multiple workers / load balancer (PM2).

I'm a little stumped at how I should handle web sockets when it comes to running multiple instances of the same app. My app requires me to send and receive messages from specific clients, however if those clients aren't connected to same instance socket.io won't be able to keep track of them and relay the message to the proper client (slice instance 1 will have a different collection of clients than instance 2). What is the best way to deal with this?

Submitted August 15, 2018 at 04:14PM by Kilawaga

No comments:

Post a Comment