cluster has a very strong bias towards workers being identical twins.
thus the only thing customizable per fork is the env: not the args,
not the exec image, not the ephemeral ports...
The listen(0) is obviously not the right thing all the time, but the
use case it addresses is:
You have an app, it does:
server.listen(0)
tellSomeoneAboutThePort(server.address.port(), tosomeone)...
You then cluster it,
if(cluster.isMaster) { fork(), fork(), fork()}
else{
// same code as before
server.listen(0)
...
}
This would stop working if all the children are all working on
different ephemeral ports, when what you wanted was multiple workers
on the same ephemeral port...
Seems to make sense.
But if you want your workers that aren't identical twins, or that call
listen(0) multiple times in a single worker, it all falls apart.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
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].
For more options, visit https://groups.google.com/groups/opt_out.