Friday, 4 September 2020

How to improve socket.io performance?

I have tried several times to scale my chat application with socket.io. I hit some kind of wall when trying to establish more than 2k websocket connections on the same machine. This number seems a bit low considering that my local machine is a 8 core 6 gb of rams and during test only half the ram and the cpu is used. Being a noob to websocket and linux i might have not configured my server perfectly so far i raised max number of open files to 500000 and max number of open socket (maxconn) to 60000 with no effect.

So my questions are:-

  • Is there a limit in the number of connections that can be created locally using socket.io?
  • How many concurent connection have you been able to establsh on a single machine using this kind of setup?
  • Are there any other linux settings to tweak in order to improve performance?

Currently, I am using ubuntu 18.04 and my application in node.js.



from How to improve socket.io performance?

No comments:

Post a Comment