Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

Hello everyone,
I'm wondering how nginx is balancing requests process among the
different workers.
Is there a scheduler ? If yes, what's the algorithm ?
I'd like to use fair queuing for my workers (i.e. send a new request to
process to the least loaded worker, based on CPU, memory or IO wait for
exemple).
Thanks in advance.

On Fri, Mar 13, 2009 at 01:09:32AM +0100, Michael Baudino wrote:
> I'm wondering how nginx is balancing requests process among the> different workers.>> Is there a scheduler ? If yes, what's the algorithm ?>> I'd like to use fair queuing for my workers (i.e. send a new request to> process to the least loaded worker, based on CPU, memory or IO wait for> exemple).
There is no workers scheduler. Workers try to hold accept_mutex which
allows only one worker to get new connections notification and to call
accept(). You can switch accept_mutex off, then all scheduling will be
done by OS scheduler via accept() call.