On Sat, Nov 23, 2013 at 3:01 AM, Marco Rogers <[email protected]> wrote:
> I have a naive question here. If cluster doesn't know if the worker is busy,
> what happens when a new connection comes in and it is still busy? Do
> requests queue at each worker? What behavior should be expected if you're
> using round robin with lots of busy workers? I'm thinking of the Heroku
> problem, which I feel like I read enough about to understand conceptually.
> This isn't my area, so when you answer you can assume I don't know what the
> hell I'm talking about :)
>
> :Marco

The cluster module operates at the level of connections, not requests.
 It's possible for a connection to enter a kind of limbo when it's
been handed off to a worker but that worker is too busy to actually
accept it.  (But only for a single connection because the worker is
removed from the pool of ready workers until it acknowledges that it
has received the connection.)

It's not possible to fix that with some kind of timeout in a race-free
way.  Handing off the connection to another worker if the first one
doesn't ack in a timely manner is subject to race conditions because
the first worker could send the ack right when the connection is
handed off to the other worker.

As a general observation, the advice that you should not block the
event loop for long periods of time also applies to clustered
applications.

-- 
-- 
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.

Reply via email to