bandwidth throttling (on a per ip/user basis)

Maxim Dounin mdounin at mdounin.ru
Mon Aug 18 16:28:53 MSD 2008


Hello!

On Mon, Aug 18, 2008 at 01:12:23PM +0200, Armin Roehrl wrote:

>  does anybody have any experience throttling
> the bandwith on a per ip/user basis with nginx?
>
> Any pointers, ideas, etc. how to implement this
> would be highly appreciated.

The only way to do it with nginx is to use request bandwidth 
limits with connection number limits.  See:

http://wiki.codemongers.com/NginxHttpCoreModule#limit_rate
http://wiki.codemongers.com/NginxHttpLimitZoneModule

This can't effectively limit bandwidth for many small requests and 
doesn't allow flexible aggregate limits though.  So it's probably 
better to use your firewall for bandwidth limiting instead.

Maxim Dounin





More information about the nginx mailing list