WebSocket handshake in Node.JS, Socket.IO and Clusters not working

后端 未结 2 592
小鲜肉
小鲜肉 2021-02-06 14:08

I having a problem with clustering my application with Node.js, socket.io and node.js clusters.

I using the socket.io-redis to share the information for all workers, but

2条回答
  •  梦谈多话
    2021-02-06 14:51

    You have to use a sticky-session to avoid clients connecting to different servers from the initial handshake. Refer this https://github.com/elad/node-cluster-socket.io

提交回复
热议问题