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…

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 ----

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

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 ----

since every browser opens 2 connections by default,

On Thu, Feb 3, 2011 at 4:43 PM, Antoine BONAVITA
[email protected] 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

Hello

Finally we found both Outlook & Thunderbird uses 6 connections for 1
client.
So the formula can be :
max_clients = worker_processes * worker_connections / 6
for mail proxy .
I don’t know if this should be described in the wiki page though…

Regards,
Soichiro Miki

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,171776,219814#msg-219814

Hi,

Regarding max clients , I understand it’s normal to have 4 in reverse
proxy
since browser uses 2 connections in HTTP 1.1.
How about mail reverse proxy?
It seems POP command from telnet client uses 4 also, although I couldn’t
find
POP3 uses more than 1 connection in RFC 1939.

Regards,
Soichiro

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,171776,217904#msg-217904

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs