<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }p { margin-top: 0px; margin-bottom: 0px; }div.FoxDiv20171201125141859650 { line-height: initial; background-image: initial; background-color: rgb(255, 255, 255); }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>I sent the test requests from one fron only 1 server.</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><p style="margin: 3.75pt 0cm; orphans: 2; widows: 2; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;">童树山</span><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;"></span></p><p style="margin: 3.75pt 0cm; orphans: 2; widows: 2; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;">咪咕视讯科技有限公司 研发部</span></p><p style="margin: 3.75pt 0cm; orphans: 2; widows: 2; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;">Mobile</span><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;">:13818663262</span></p><p style="margin: 3.75pt 0cm; orphans: 2; widows: 2; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;">Telephone</span><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif;">:021-51856688(81275)</span></p><div style="font-size: 13.3333px; orphans: 2; widows: 2;"><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif; line-height: 21px; background-color: window;">Email</span><span style="font-size: 9pt; font-family: 微软雅黑, sans-serif; line-height: 21px; background-color: window;">:</span><a href="mailto:tongshushan@migu.cn" target="_blank" style="font-size: 10pt; line-height: 1.5; background-color: window;">tongshushan@migu.cn</a></div></div></span></div>
<blockquote style="margin-Top: 0px; margin-Bottom: 0px; margin-Left: 0.5em"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:lists@lazygranch.com">Gary</a></div><div><b>Date:</b> 2017-12-01 12:17</div><div><b>To:</b> <a href="mailto:nginx@nginx.org">nginx</a></div><div><b>Subject:</b> Re: How to control the total requests in Ngnix</div></div></div><div><div class="FoxDiv20171201125141859650">
<div id="response_container_BBPPID" style="outline:none;font-size:initial;font-family:"Calibri","Slate Pro",sans-serif,"sans-serif"" dir="auto" contenteditable="false"> <div name="BB10" dir="auto" style="width: 100%; padding: initial; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">I thought the rate is per IP address, not for whole server. </div> <div name="BB10" dir="auto" style="width: 100%; padding: initial; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"> <br style="display:initial"></div> <div id="blackberry_signature_BBPPID" name="BB10" dir="auto"> <div name="BB10" dir="auto" style="padding: initial; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div> </div></div><div id="_original_msg_header_BBPPID" dir="auto"> <table width="100%" style="background-color: white; border-spacing: 0px; display: table; outline: none;" contenteditable="false"><tbody><tr><td colspan="2" style="padding: initial; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"> <div style="border-right: none; border-bottom: none; border-left: none; border-image: initial; border-top: 1pt solid rgb(181, 196, 223); padding: 3pt 0in 0in; font-family: Tahoma, "BB Alpha Sans", "Slate Pro"; font-size: 10pt;"> <div id="from"><b>From:</b> tongshushan@migu.cn</div><div id="sent"><b>Sent:</b> November 30, 2017 7:18 PM</div><div id="to"><b>To:</b> nginx@nginx.org</div><div id="reply_to"><b>Reply-to:</b> nginx@nginx.org</div><div id="subject"><b>Subject:</b> Re: Re: How to control the total requests in Ngnix</div></div></td></tr></tbody></table> <br> </div><!--start of _originalContent --><div name="BB10" dir="auto" style="background-image: initial; line-height: initial; outline: none;" contenteditable="false"><div id="ssc19929" style="line-height: 1.5; font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0);"><div><div>I configured as below:</div><div><b>limit_req_zone</b> "all" zone=all:100m rate=<b>2000r</b>/s;</div><div><b>limit_req </b>zone=all burst=100 nodelay;</div><div>but when testing,I use tool to send the request at: Qps:<span style="font-size:10.5pt;line-height:1.5">486.1(not reach 2000) I got the many many 503 error,and the error info as below:</span></div><div><span style="font-size:10.5pt;line-height:1.5"><br></span></div><div><span style="font-size:10.5pt;line-height:1.5"> </span><span style="font-size:10.5pt;line-height:1.5">2017/12/01 11:08:29 [error] 26592#37196: *15466 limiting requests, <b>excess: <font color="#ff0000">101.000</font></b> by zone "all", client: <wbr><a href="http://127.0.0.1">127.0.0.1</a><wbr>, server: localhost, request: "GET /private/rush2purchase/inventory/aquire?productId=product1 HTTP/1.1", host: "localhost"</span></div><div><br></div><div>Why <span style="font-size:10.5pt;line-height:1.5">excess: 101.000? I set it as 2000r/s ?</span></div><div><br></div><hr style="width:210px;min-height:1px" size="1" align="left"><div><div style="margin:10px;font-family:'verdana';font-size:10pt"><p style="margin: 0px 0cm; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif">童树山</span><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif"></span></p><p style="margin: 0px 0cm; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif">咪咕视讯科技有限公司 研发部</span></p><p style="margin: 0px 0cm; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif">Mobile</span><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif">:13818663262</span></p><p style="margin: 0px 0cm; font-size: 14px; font-family: 微软雅黑; line-height: 21px;"><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif">Telephone</span><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif">:021-51856688(81275)</span></p><div style="font-size:13.3333px"><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif;line-height:21px">Email</span><span style="font-size:9pt;font-family:'微软雅黑' , sans-serif;line-height:21px">:</span><a href="mailto:tongshushan@migu.cn" style="font-size:10pt;line-height:1.5">tongshushan@migu.cn</a></div></div></div><blockquote style="margin-top:0px;margin-bottom:0px;margin-left:0.5em"><div> </div><div style="border:none;border-top:solid #b5c4df 1pt;padding:3pt 0cm 0cm 0cm"><div style="padding-right:8px;padding-left:8px;font-size:12px;font-family:'tahoma';color:#000000;background:#efefef;padding-bottom:8px;padding-top:8px"><div><b>From:</b> <a href="mailto:francis@daoine.org">Francis Daly</a></div><div><b>Date:</b> <a href="tel:2017120102">2017-12-01 02</a>:38</div><div><b>To:</b> <a href="mailto:nginx@nginx.org">nginx</a></div><div><b>Subject:</b> Re: Re: How to control the total requests in Ngnix</div></div></div><div><div>On Thu, Nov 30, 2017 at 08:04:41PM +0800, <a href="mailto:tongshushan@migu.cn">tongshushan@migu.cn</a> wrote:</div>
<div> </div>
<div>Hi there,</div>
<div> </div>
<div>> what is the same "key " for all requests from different client ips for limit_conn_zone/limit_req_zone? I have no idea on this.</div>
<div> </div>
<div>Any $variable might be different in different connections. Any fixed</div>
<div>string will not be.</div>
<div> </div>
<div>So:</div>
<div> </div>
<div> limit_conn_zone "all" zone=all...</div>
<div> </div>
<div>for example.</div>
<div> </div>
<div> f</div>
<div>-- </div>
<div>Francis Daly <a href="mailto:francis@daoine.org">francis@daoine.org</a></div>
<div>_______________________________________________</div>
<div>nginx mailing list</div>
<div><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></div>
<div><wbr><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a><wbr></div>
</div></blockquote></div></div><!--end of _originalContent --></div></div></div></blockquote>
</body></html>