1. How nginx define a free worker
"ngx_accept_disabled = ngx_cycle->connection_n / 8 -
ngx_cycle->free_connection_n;"
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@gmail.com>wrote:
> Hi,
> 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?
> regards
> Vivek Goel
>
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
--
--
Charles Chen
Software Engineer
Server Platforms Team at Taobao.com
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel