Answer the question
In order to leave comments, you need to log in
Nginx set requests limit per second, for requests with certain parameters in query or body (POST,GET)?
I have nginx on local, which receives requests from a server, also local. Nginx redirects these requests to VK, and then gives it to the server. The request may contain special parameters, such as user id, or something else. How can I set limit requests per second for requests with such and such a parameter, for example, for requests in which USER_ID is the same?
For example, I can set
http {
limit_req_zone $server_name zone=mylimit:10m rate=3r/s;
server {
listen 8044;
limit_req_log_level warning;
location /route/{
limit_req zone=mylimit burst=1000;
proxy_pass https://api.vk.com/;
} }}
Answer the question
In order to leave comments, you need to log in
Documentation for what?
nginx.org/ru/docs/http/ngx_http_limit_req_module.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question