On May 1, 4:30 pm, Matt <hel...@gmail.com> wrote:
> Often you'll find a cluster()'d node app favouring one process to do most
> of the work, rather than spreading the load more evenly.
>
> This is due to how the OS schedules the load balancing between processes.
> I'm assuming Bert is talking about maybe migrating some of that load
> balancing logic into Node itself (or rather, into the cluster module), so
> that it can make smarter decisions about which process to send the request
> to.
>
> Matt.

Matt is close.

When a connection is accepted the server file descriptor stays in the
watched file descriptor set. That means that if the app you try to
load balance does a lot of i/o, the most busy process is also the most
likely to pick up new connections. The solution we found (at cloud9)
was to remove the file descriptor from the epoll/kqueue/eventport
interest set, and reinsert it when the process is idle for a moment.
Unfortunately there is currently no way to do this with a stock node.

- Bert

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to