Welcome! Log In Create A New Profile

Advanced

Limitting Requests but dynamically

May 12, 2023 05:57AM
Hello,

I'm looking a way to deploy a solution for a specific server. Actually we have a request limit per source ip based, but somehow i need to improve this approach for a certain location. Let me explain what i'm looking for.

We have a limit that controls the number of http requests matched for a server definition. But after this certain treshold limit reached, we would like to stop requests for a specific location. Is there any way to see the number of request ? Or, is there any way to see a limiting definition actual status?

"""
limit_req_zone $remote_addr zone=per_ipv4:5M rate=100r/s;
limit_req_status 429;

server {
listen 80;
server_name *.matsushita.org;
limit_req zone=per_ipv4;

location /aj1 {
....;
}
location /ts_pwx {
# this is the place where we stop requests after the limit (per_ipv4) exceed
}
}
"""
Subject Author Posted

Limitting Requests but dynamically

JinHitman May 12, 2023 05:57AM

Re: Limitting Requests but dynamically

JinHitman May 15, 2023 06:05AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready