Welcome! Log In Create A New Profile

Advanced

Re: How nginx define a free worker?

chen cw
November 22, 2012 10:40PM
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
Subject Author Views Posted

How nginx define a free worker?

goelvivek 1235 November 21, 2012 11:54AM

Re: How nginx define a free worker?

chen cw 622 November 22, 2012 10:40PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 144
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready