Welcome! Log In Create A New Profile

Advanced

Re: New nginx module: ngx_softlimit

scyth
June 30, 2010 01:34PM
On Wed, 30 Jun 2010 20:53:58 +0400
Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Wed, Jun 30, 2010 at 06:28:51PM +0200, Zeljko Tomic wrote:
>
> > I wrote a small, but sometimes very useful module for limiting
> > the number of active connections, in a "soft" way.
> >
> > Description and usage:
> > -----------------------
> > In situation when using nginx for serving static files and
> > primarily as a proxy/proxy_cache with some slower backend (or
> > even php fastcgi), limits of connections and requests that nginx
> > can handle are much higher than they are on backend server(s).
> > When you know the limits of your backend, it is bad practice to
> > apply those limits on nginx's worker_connections, because it's
> > obvious that when limits are met, new requests won't come
> > through and this leaves you with bad visitor experience.
>
> It would be a good idea to clarify differences from limit_conn
> module. Right now it looks like use cases you consider are better
> handled by limit_conn.

The difference is that limit_conn (from limit_zone module) limits the number of simultaneous connections PER IP. This is useful in many cases, but soflimit_module, as stated above, compares its limit with total number of active connections, which is different. For example, site can have 2000 different clients with 1 connection each, but backend can handle only 300 without performance issues. Actual limits of course vary from site to site.

>
> Maxim Dounin
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://nginx.org/mailman/listinfo/nginx-devel


--
Zeljko Tomic <scyth@unixreich.com>

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

New nginx module: ngx_softlimit

Zeljko Tomic 2589 June 30, 2010 12:30PM

Re: New nginx module: ngx_softlimit

Denis F. Latypoff 996 June 30, 2010 12:38PM

Re: New nginx module: ngx_softlimit

Zeljko Tomic 994 June 30, 2010 12:50PM

Re: New nginx module: ngx_softlimit

Maxim Dounin 999 June 30, 2010 12:56PM

Re: New nginx module: ngx_softlimit

scyth 933 June 30, 2010 01:34PM

Re: New nginx module: ngx_softlimit

Maxim Dounin 914 June 30, 2010 06:56PM

Re: New nginx module: ngx_softlimit

Zeljko Tomic 962 June 30, 2010 08:28PM

Re: New nginx module: ngx_softlimit

Maxim Dounin 1006 June 30, 2010 11:44PM

Re: New nginx module: ngx_softlimit

Zeljko Tomic 1331 July 01, 2010 11:52AM



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

Online Users

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