Appropriate use for nginx?

Roger Pack rogerpack2005 at
Wed Sep 19 23:11:22 MSD 2007

Hi Malte.
Being able to establish persistent connections would enable nginx to
'reuse' them -- thus avoiding the (small) latency of TCP slow start for each
connection.  Of course the question that then arises in ones mind would
be 'how many permanent connections to make'--a possible answer being either
a fixed number per backend, or a dynamic pool (i.e. as many as you ever
happen to need, reusing them as they are freed).  It would be nice, for
example, to be able to specify a certain number of maximum connections to
each instance of Mongrel (running Ruby on Rails) at one, as only one can be
processed at a time, and this would then guarantee load balancing between

The next step in this particular paradigm would be to have nginx specify and
open a port on which backends can connect, themselves, and then have nginx
automatically balance between all currently connected back ends.  This would
enable a user to create more mongrel instances (say on other machines) and
attach them to nginx silently and without any down time.

In retrospect I think TCP slow start is not dramatically slow when on the
same machine, and nginx already does some nice load balancing, but my
suggestions might result in a minimal gain, but maybe a few milliseconds.

On 9/17/07, Malte Sussdorff <sussdorff at> wrote:
> Hi Roger, which benefits do you envision from this, can you give
> examples? I am just intrigued. Thanks Malte
> Am 17.09.2007 um 21:08 schrieb Roger Pack:
> > Hmm. I then wonder if nginx has the optional ability to establish
> > constant connections with a backend, then reuse those (i.e. its own
> > keep-alive's with an http proxy--establish a single connection,
> > client A connects to nginx, nginx uses it, then after that B
> > connects to nginx, nginx reuses A's connection for B's transfer).
> > That might be useful. Thanks!
> -
> -Roger Pack
> I like belief.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list