Spawn/Fork multiple nodejs processes (web sockets)

31 views
Skip to first unread message

Node Developer

unread,
Feb 22, 2016, 12:01:13 PM2/22/16
to nod...@googlegroups.com

Hello guys,

I’m designing an application which will allow users to start a long running web socket node process and they will need to be able to manage it (getting status, stoping and starting at will).

In order to make the application scalable I need to distribute these node process executions between multiple servers, and I was thinking of setting up a load balancer to do so. 

To give the ability to the user to manage the process at will, I'll need to keep track of each process id (pid), and the machine it's running on. How do I achieve that? Has anyone implemented something like that ? 

Thank you

Christopher Mina

unread,
Feb 23, 2016, 9:12:26 AM2/23/16
to nodejs
I've used NGINX as a reverse proxy / load balancer, seems to work well so far. 

Socket.IO has a good explanation of how to use NGINX with sticky sessions to enable websockets to work in a load balanced cluster:


-Chris
Reply all
Reply to author
Forward
0 new messages