Hello, first of all I would like to mention that I read many items on the forum and outsite it, but I still can't completely understand the way this module work and that's the reason why I ask you here and thank you in advance if you help me.
1. I want to limit requests to vhosts per IP so if one Ip flood the vhost, the other visitors ot be ok and not banned. From my tests until now this not happens. Whe other ip flood the vhost I can't open the vhost's site too. This happens with the following configuration:
limit_req_zone $binary_remote_addr zone=perip:10m rate=100r/s;
limit_req zone=perip burst=100 nodelay;
How can I limit the vhost per ip so the other visitors to not have a problem? Also i would like to have another restriction that will limit the requests to vhosts not per ip, but for example 200 requests to one vhost from all visitors,another 200 requests limit to other vhost and so on.
2. I can't understand if burst limit and req_zone limit must be the same value? I want to set limit 200 requests from ip for example and on the 201 requests the ip to be denied with 503? Does the module can work on this way and how can I achieve this? One value to req_zone, but other to burst or what?
3. Why every next time I run apache bench mark the failed requests number is different, but not equal as the server limit is not changed in nginx?
1. I want to limit requests to vhosts per IP so if one Ip flood the vhost, the other visitors ot be ok and not banned. From my tests until now this not happens. Whe other ip flood the vhost I can't open the vhost's site too. This happens with the following configuration:
limit_req_zone $binary_remote_addr zone=perip:10m rate=100r/s;
limit_req zone=perip burst=100 nodelay;
How can I limit the vhost per ip so the other visitors to not have a problem? Also i would like to have another restriction that will limit the requests to vhosts not per ip, but for example 200 requests to one vhost from all visitors,another 200 requests limit to other vhost and so on.
2. I can't understand if burst limit and req_zone limit must be the same value? I want to set limit 200 requests from ip for example and on the 201 requests the ip to be denied with 503? Does the module can work on this way and how can I achieve this? One value to req_zone, but other to burst or what?
3. Why every next time I run apache bench mark the failed requests number is different, but not equal as the server limit is not changed in nginx?