multiple limit_req_zone

Valentin V. Bartenev vbart at
Sat Sep 13 20:48:10 UTC 2014

On Saturday 13 September 2014 16:37:05 matt_l wrote:
> Hello
> Please may I ask a question with respect to limit_req_zone to better
> understand how it works
> Can I have multiple limit_re_zone statements?

Of course, you can.

> limit_req_zone  $binary_remote_addr     zone=one:10m    rate=10r/s;
> limit_req_zone  $binary_remote_addr     zone=two:10m    rate=10r/s;

This defines two separate memory zones with different names, where
information about requests can be collected.  Please note that these 
directives alone don't do anything useful.  To actually apply the limit,
you also need to specify the limit_req directive.

See the documentation:

  wbr, Valentin V. Bartenev

More information about the nginx mailing list