W
W
wzk2015-11-28 18:11:13
Node.js
wzk, 2015-11-28 18:11:13

How to distribute child processes to multiple servers in node js?

There is a main websocket server on node. It listens for connections to itself and launches child processes via exec on the same machine. Resources became scarce, since one process can eat 70-80 CPUs, and we thought about load distribution. Now an 8-core CPU is clogged at 80-90%.
Of course, you can take the most powerful server with a large number of cores, but it would be cheaper to scatter all its children on other machines.
Remote launch via ssh has been implemented, but how to achieve uniformity?
*Each child process has a parameter that affects its final gluttony. That is, at the launch stage, we can roughly understand how much he will eat.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question