global rate limit

James Oakley jfunk at
Fri Oct 17 16:43:09 MSD 2008

On Thursday 16 October 2008 21:24:07 Jakub Kasica wrote:
> Hello.
> Is there any possibility to limit traffic in nginx?
> I found limit rate directive but this  limits only per client.  I need
> something which can guarantee to keep me under 100 mbits because over
> this value i have to pay a bit to much.

If you're using Linux, you can use tc:

See the section "Queueing Disciplines for Bandwidth Management" for 
information about rate control. You will probably want to use Hierarchical 
Token Bucket (HTB).

See "Advanced filters for (re-)classifying packets" for information on how to 
control what traffic gets queued.

The cookbook section has some examples.

James Oakley
jfunk at

More information about the nginx mailing list