Good way to use socket.io with cluster in multi-core server?

前端 未结 1 947
误落风尘
误落风尘 2021-02-09 08:15

I have created a nodejs application which works fine in a single core. This application uses socket.io for light&fast communication.

Now, I wanted to scale my appl

相关标签:
1条回答
  • 2021-02-09 09:11

    You could use socket.io as normal but with a redis store in the background. It will also support multiple instances on socket.io without any external library. It even supports rooms over multiple instances.

    Link to how to set up socket.io with redis: Using Multiples Nodes/Processes with socket.io

    0 讨论(0)
提交回复
热议问题