Monday, 12 November 2018

NodeJS and Socket.io scaling HELP.

I have done my fair share of research on NodeJS and how to scale servers. I'm planning to work on a project that will require the use of Node.JS and Socket.io. I'm stuck wondering what the best solution for a scalable socket.io application is (One that may be horizontally scaled if necessary).Right now I am considering using PM2 clusters to host different processes on multiple ports across a server (with Nginx or HAProxy to load balance). But a limitation I'm thinking of is how many ports I'm able to consume before it becomes a burden to the server or how many processes I'm able to spin out of PM2 before the server crashes.I was also thinking of implementing a redis pub/sub but I'm not sure how I'm going to duplicate my Node.JS servers (would it still be with PM2?).​I would really appreciate some valuable feedback, as a solid answer will really pivot me to the right path. THANK YOU.

Submitted November 13, 2018 at 03:54AM by BladeoftheRuinedKing

No comments:

Post a Comment