Calculating the max. clients by worker_connections

Antoine BONAVITA antoine_bonavita at yahoo.com
Thu Feb 3 23:30:21 MSK 2011


So, if you have 2 per browser, it's normal to have 4 in reverse proxy. 
Basically, the reverse proxy uses one connection to the backend for each 
connection to the browser. And since all connections come from the same pool, 
the 4 makes sense.

A.




----- Original Message ----
> From: Ryan Chan <ryanchan404 at gmail.com>
> To: nginx at nginx.org
> Sent: Thu, February 3, 2011 5:38:49 PM
> Subject: Re: Calculating the max. clients by worker_connections
> 
> In fact,
> 
> As normal web server, the maths would also be
> 
> max_clients  = worker_processes * worker_connections / 2
> 
> since every browser opens 2  connections by default,
> 
> 
> On Thu, Feb 3, 2011 at 4:43 PM, Antoine  BONAVITA
> <antoine_bonavita at yahoo.com>  wrote:
> > I would say "and nginx uses the fds (file descriptors) from the  same pool 
to
> > connect to the upstream backen" (wiki quote). But that  should be 2, not 4: 
I
> > agree with you on this.
> > If any of the  gurus out there could shed light on this, I'm sure a lot of 
us
> > would  appreciate.
> >
> > Antoine.
> >
> >
> >
> > -----  Original Message ----
> >> From: Ryan Chan <ryanchan404 at gmail.com>
> >>  To: nginx at nginx.org
> >> Sent: Thu,  February 3, 2011 4:51:40 AM
> >> Subject: Calculating the max. clients by  worker_connections
> >>
> >> In the wiki (http://wiki.nginx.org/EventsModule#worker_connections), it  
> said:
> >>
> >> -----------------
> >> The  worker_connections and worker_proceses  from the main section
> >> allows  you to calculate maxclients  value:
> >>
> >> max_clients =  worker_processes * worker_connections
> >>
> >> In a  reverse  proxy situation, max_clients becomes
> >>
> >> max_clients =   worker_processes * worker_connections/4
> >>
> >> Since a browser  opens 2  connections by default to a serve...
> >>  -----------------
> >>
> >> Why only in  reverse proxy mode, the  max clients is it divided by 4,
> >> but not divided by 2  as normal web   server?
> >>
> >>  _______________________________________________
> >> nginx mailing   list
> >> nginx at nginx.org
> >> http://nginx.org/mailman/listinfo/nginx
> >>
> >
> >
> >
> >
> >  _______________________________________________
> > nginx mailing  list
> > nginx at nginx.org
> > http://nginx.org/mailman/listinfo/nginx
> >
> 
> _______________________________________________
> nginx  mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
> 


      



More information about the nginx mailing list