block x requests per second

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

block x requests per second

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

Thanks!

_______________________________________________
nginx mailing list
[hidden email]
http://nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: block x requests per second

Maxim Dounin
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

_______________________________________________
nginx mailing list
[hidden email]
http://nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: block x requests per second

antituhan
In reply to this post by AMP Admin
For now, I think NginX can only limit by bandwidth usage (CMIIW)
If you want to limit by request(s) per second, you can use 3rd party program (eg: firewall)
[daemon@antituhan.com ~]#