Welcome! Log In Create A New Profile

Advanced

Limit reqs per user / bot

January 07, 2016 05:30PM
I want to limit requests to 1 per second for each user, counting a bot that makes requests from multiple ips as a single user. Does this make sense:

map $http_user_agent $single_user {
default $binary_remote_addr;
~PaperLiBot 1;
}

limit_req_zone $single_user zone=one:10m rate=1r/s;

...

limit_req zone=one burst=2;



Thanks

Dave
Subject Author Posted

Limit reqs per user / bot

djeyewater January 07, 2016 05:30PM

Re: Limit reqs per user / bot

itpp2012 January 08, 2016 01:39AM

Re: Limit reqs per user / bot

djeyewater January 08, 2016 02:52PM

Re: Limit reqs per user / bot

B.R. January 08, 2016 03:06PM

Re: Limit reqs per user / bot

djeyewater January 09, 2016 08:44AM

Re: Limit reqs per user / bot

B.R. January 10, 2016 09:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready