<div dir="ltr">> <span style="font-size:12.8px">If this is an exact configuration you've tried to test with,</span><br style="font-size:12.8px"><span style="font-size:12.8px">> you've probably tested something very different, as there is no</span><br style="font-size:12.8px"><span style="font-size:12.8px">> "logation" directive in nginx.</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Oh, location is correct.</span></div><div><br></div><div>http {</div><div><div style="font-size:12.8px">  limit_req_zone fixedstring zone=upstream:1m rate=5000r/s;</div><div style="font-size:12.8px">}</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">server {</div><div style="font-size:12.8px">  server_name vhosta;</div><div style="font-size:12.8px">  location / {</div><div style="font-size:12.8px">    limit_req zone=upstream burst=25;</div><div style="font-size:12.8px">    proxy_pass <a href="http://some_upstream/" target="_blank">http://some_upstream</a>;</div><div style="font-size:12.8px">  }</div><div style="font-size:12.8px">}</div><div style="font-size:12.8px">server {</div><div style="font-size:12.8px">  server_name vhostb;</div><div style="font-size:12.8px">  location / {</div><div style="font-size:12.8px">    limit_req zone=vhostb nodelay;</div><div style="font-size:12.8px">    limit_req zone=upstream burst=25;</div><div style="font-size:12.8px">    proxy_pass <a href="http://some_upstream/" target="_blank">http://some_upstream</a>;</div><div style="font-size:12.8px">  }</div><div style="font-size:12.8px">}</div></div><div><br></div><div><span class="gmail-">> > It seems that each virtual hosts limits 5000r/s and entire nginx will<br>> > 10000r/s.<br>><br></span>> No, this is not how it works.<br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks for explict answer.</span></div><div><span style="font-size:12.8px"><br></span></div><div>> Detailed information can be found in debug log, see<br>> <a href="http://nginx.org/en/docs/debugging_log.html" rel="noreferrer" target="_blank">http://nginx.org/en/docs/<wbr>debugging_log.html</a>.<span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">We will try, thanks again.</span></div><div><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 15, 2017 at 9:50 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<span class="gmail-"><br>
On Wed, Mar 15, 2017 at 08:47:15PM +0900, Nishikubo Minoru wrote:<br>
<br>
> We want to limit outgoing(upstream) rate with the fixed string key among<br>
> various virtual hosts as follows:<br>
><br>
> limit_req_zone fixedstring zone=upstream:1m rate=5000r/s;<br>
><br>
> server {<br>
>   server_name vhosta;<br>
>   logation / {<br>
<br>
</span>If this is an exact configuration you've tried to test with,<br>
you've probably tested something very different, as there is no<br>
"logation" directive in nginx.<br>
<br>
[...]<br>
<span class="gmail-"><br>
> But on our test, the nginx server send to upstream server 6738 requests in<br>
> a second.<br>
> (The vhosta sent 3677 requests, and the vhostb sent 3061 requests)<br>
<br>
</span>Note that testing exact number of requests in a particular second<br>
doesn't really make sense as small time difference in time will<br>
introduce large errors.  Try measuring the average rate of<br>
requests for a larger period of time.<br>
<span class="gmail-"><br>
> It seems that each virtual hosts limits 5000r/s and entire nginx will<br>
> 10000r/s.<br>
<br>
</span>No, this is not how it works.<br>
<span class="gmail-"><br>
> Anyway, we will set limit_req_log_level to info level.<br>
> Does anyone know limit_req detailed log information?<br>
<br>
</span>Detailed information can be found in debug log, see<br>
<a href="http://nginx.org/en/docs/debugging_log.html" rel="noreferrer" target="_blank">http://nginx.org/en/docs/<wbr>debugging_log.html</a>.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" rel="noreferrer" target="_blank">http://nginx.org/</a><br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div></div>