block x requests per second

Maxim Dounin mdounin at mdounin.ru
Sat Jan 8 04:31:47 MSK 2011


Hello!

On Fri, Jan 07, 2011 at 03:43:31PM -0600, Team AMP wrote:

> Is there a way to block a host if it makes too many requests per second?

Limit req module allows to delay/reject requests which are above 
certain threshold, see here:

http://wiki.nginx.org/HttpLimitReqModule

There are not way to block hosts permanently after exceeding 
threshold.  Usual aproach is to use fail2ban or something like to 
block them on your firewall if it keeps exceeding limit_req 
thresholds (e.g. based on limit_req erros in error_log.

Maxim Dounin



More information about the nginx mailing list