New nginx module: ngx_softlimit

Maxim Dounin mdounin at
Wed Jun 30 20:53:58 MSD 2010


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.

Maxim Dounin

More information about the nginx-devel mailing list