nginx limit_req_module with upstream limit_rate

Nishikubo Minoru minoru.nishikubo at lyz.jp
Wed Mar 15 11:47:15 UTC 2017


Hello,

We want to limit outgoing(upstream) rate with the fixed string key among
various virtual hosts as follows:

limit_req_zone fixedstring zone=upstream:1m rate=5000r/s;

server {
  server_name vhosta;
  logation / {
    limit_req zone=upstream burst=25;
    proxy_pass http://some_upstream;
  }
}
server {
  server_name vhostb;
  logation / {
    limit_req zone=vhostb nodelay;
    limit_req zone=upstream burst=25;
    proxy_pass http://some_upstream;
  }
}

But on our test, the nginx server send to upstream server 6738 requests in
a second.
(The vhosta sent 3677 requests, and the vhostb sent 3061 requests)



It seems that each virtual hosts limits 5000r/s and entire nginx will
10000r/s.
Anyway, we will set limit_req_log_level to info level.
Does anyone know limit_req detailed log information?
Our nginx version is nginx version: nginx/1.10.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170315/a13c896f/attachment.html>


More information about the nginx mailing list