Maxim Dounin
October 29, 2014 01:54PM
Hello!

On Wed, Oct 29, 2014 at 01:15:56PM -0400, newnovice wrote:

> Maxim Dounin Wrote:
> -------------------------------------------------------
> > Hello!
> >
> > On Tue, Oct 28, 2014 at 08:01:33PM -0400, newnovice wrote:
> >
> > > Maxim,
> > >
> > >
> > http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
> > >
> > > I would like to know what is the keepalive timeout for this
> > connection pool?
> > > Is it static?
> >
> > As of now, there is no timeout on nginx side. Connections are
> > closed either by backends or if there isn't enough room in
> > the cache.
>
> So how long after a connection to upstream goes from ACTIVE to idle in the
> connection pool does it get closed?
> There is not really much documentation on this upstream keepalive component.

That's unspecified, see above.

> > > Also i want to understand - if there is a marriage between number of
> > > connections nginx gets vs how many it opens to upstream?
> >
> > This depends on how long it takes to process a request (as well as
> > various other factors). As long as backends are fast enough, one
> > connection to upstream may be enough to handle tens or hundreds of
> > client connections.
>
> Ok.
> What is the difference between 'max_conns' vs
> http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn to
> an upstream service ?

The "max_conns" parameter (only available in nginx-plus) limits
the number of active connections to an upstream server, while
limit_conn limits the number of active connections to a particular
location. This difference may be significant, for example, in the
following cases:

- there are many upstream servers in a single upstream{} block;

- some responses are returned from cache;

- responses are large enough and clients are slow, so responses
are buffered by nginx for a long time.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Trying to Understand Upstream Keepalive

abstein2 May 08, 2014 01:34AM

Re: Trying to Understand Upstream Keepalive

Maxim Dounin May 08, 2014 10:08PM

Re: Trying to Understand Upstream Keepalive

newnovice October 28, 2014 08:01PM

Re: Trying to Understand Upstream Keepalive

Maxim Dounin October 29, 2014 12:32PM

Re: Trying to Understand Upstream Keepalive

newnovice October 29, 2014 01:15PM

Re: Trying to Understand Upstream Keepalive

Maxim Dounin October 29, 2014 01:54PM

Re: Trying to Understand Upstream Keepalive

newnovice October 29, 2014 02:20PM

Re: Trying to Understand Upstream Keepalive

Maxim Dounin October 29, 2014 04:16PM

Re: Trying to Understand Upstream Keepalive

aanchalj June 14, 2016 04:09AM

Re: Trying to Understand Upstream Keepalive

Valentin V. Bartenev June 14, 2016 08:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
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