F
F
foundationick2017-09-13 00:32:16
Nginx
foundationick, 2017-09-13 00:32:16

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/;
} }}

limit_req_zone $server_name how can I configure it, what to limit by parameters?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Mukovoz, 2017-09-13
@foundationick

Documentation for what?
nginx.org/ru/docs/http/ngx_http_limit_req_module.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question