The "Cluster" documentation 
(https://nodejs.org/api/cluster.html#cluster_how_it_works) claims that 
"round-robin" is the default, except on Windows, and this information, 
together with similar example code, is repeated in dozens of blogs round 
the web. However, when I run the examples on Linux and look at the output 
from sudo strace -p "`pidof nodejs`" I find that it is not doing 
"round-robin" at all: the master process remains asleep, while the workers 
listen on the same socket and the kernel distributes incoming connections 
amongst them in a typically rather unbalanced fashion.

In order to get the "default", "round-robin" behaviour perhaps I have to 
create a socket before invoking cluster.fork. But how would I do that? Does 
anyone have an example that actually does what the documentation says is 
the default?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/120175cb-42b9-4701-a599-26d4d4997886%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to