How nginx define a free worker?
crk_world at yahoo.com.cn
Fri Nov 23 03:38:06 UTC 2012
1. How nginx define a free worker
"ngx_accept_disabled = ngx_cycle->connection_n / 8 -
so when the number of free connections is more than the value of
"worker_connections" directive, the worker is free.
2. Will it be doing round robin?
No, it is not RR.
In fact, nginx use the tecnology called "accept mutax", so only one worker
is listening on the port, others are waiting.
you can refer to "ngx_process_events_and_timers()" for more information.
On Thu, Nov 22, 2012 at 12:51 AM, Vivek Goel <goelvivek2011 at gmail.com>wrote:
> If I have n cores and I am running n nginx worker process how nginx will
> decide free worker for next connection?
> 1. Will it be doing round robin?
> If it is not using round robin what method it use? Is there a way I can
> force it to use round robin method?
> Vivek Goel
> nginx-devel mailing list
> nginx-devel at nginx.org
Server Platforms Team at Taobao.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx-devel