Answer the question
In order to leave comments, you need to log in
Limit_req_zone "for everyone else" in NGINX?
Gentlemen, help me understand how it is possible to prescribe Limit_req_zone so to speak for "for everyone else" who are not included in the described conditions?
Here is an example
in http
map $server_protocol $limit {
"HTTP/1.0" $binary_remote_addr;
default "";
}
limit_req_zone $limit zone=bot:10m rate=1r/m;
limit_req zone=bot;
and everything works limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
limit_req zone=one burst=5 nodelay;
Answer the question
In order to leave comments, you need to log in
nginx.org/ru/docs/http/ngx_http_limit_req_module.html
There can be several limit_req directives. For example, the following configuration limits the processing rate of requests coming from a single IP address, and at the same time limits the processing rate of requests to a single virtual server:
limit_req_zone $binary_remote_addr zone=perip:10m rate=1r/s;
limit_req_zone $server_name zone=perserver:10m rate=10r/s;
server {
...
limit_req zone=perip burst=5 nodelay;
limit_req zone=perserver burst=10;
}
Directives are inherited from the previous level, provided that this level does not have its own limit_req directives.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question