There is a good explanation here . In short, there are 2 different behaviors in your version of node:
node 0.8-0.10 (and 0.12+ on Windows): each process listens on a port. The OS decides which one to wake up when a new connection arrives. In some applications under some operating systems, this does not work very well and leaves several processes with a strong majority of connections; in most it works just fine.
node 0.12+ (except Windows): The main process is listening on the port. When they enter, he passes them on in a working circular fashion.
In any of these cases, your application should consider it as random (although you can probably assume reasonable load balancing characteristics). However, if for some reason you need finer control, one suggestion in this article (note that it was written by the main contributor to node.js, so there are some permissions here):
Turning a selection algorithm into something that is configured or connected by the developer is the change that is being considered.
says you can get what you are looking for. There seems to be a problem on Github related to this option.
source share