-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change: cluster connection behavior when between workers #1239
Comments
The OP is being too charitable calling this a "Breaking change". IMO this is a serious regression that is preventing us from upgrading from v0.10 to v0.12. One of the main reasons for using a cluster is to provide a high availability service - in v0.12 that is impossible because if all the workers die the clients will see "connection refused". |
This commit is the origin of the changed behavior, investigating. |
Hmm, does
Sound like this issue? |
cc @bnoordhuis since he wrote that commit. |
A documentation issue, perhaps. The change itself is intentional.
That's not a design goal of the cluster module and never has been. |
A docs fix has been landed in 4c5fc3b, thanks for reporting this! |
@bnoordhuis: Would it be possible to implement the previous behavior in userland? I'm thinking something along the lines of having the master process create and bind the socket, but never call accept() on it. Basically I want a |
Already reported this on node 0.12, thought I should report it here as well.
On OSX, I've noticed a big difference between the way that connections are dealt with by a master process when there are no workers ready to take care of that incoming connection. In node
0.10.36
(and before), the connection would be held open, and a worker that hadn't been started when that request was made would have the chance to handle it. In all versions of iojs (and node0.12.0
), incoming connections when between workers are outright refused.At the very least, this should be documented.
Example code and output on both node
0.10.36
and iojs1.6.1
follows:output
iojs 1.6.1 (scheduling policy does not make a difference):
node 0.10.36:
This version hangs, because third worker not started, and master keeps connection open. Note also that '0: second request complete' actually comes after '1: worker listening!'. This is because that initial second request actually ends up hitting the second worker.
The text was updated successfully, but these errors were encountered: