How to control the total requests in Ngnix

tongshushan at tongshushan at
Fri Dec 1 03:18:06 UTC 2017

I configured as below:
limit_req_zone "all" zone=all:100m rate=2000r/s;
limit_req zone=all burst=100 nodelay;
but when testing,I use tool to send the request at: Qps:486.1(not reach 2000)  I got the many many 503 error,and the error info as below:

 2017/12/01 11:08:29 [error] 26592#37196: *15466 limiting requests, excess: 101.000 by zone "all", client:, server: localhost, request: "GET /private/rush2purchase/inventory/aquire?productId=product1 HTTP/1.1", host: "localhost"

Why excess: 101.000? I set it as 2000r/s ?

咪咕视讯科技有限公司 研发部
Email:tongshushan at
From: Francis Daly
Date: 2017-12-01 02:38
To: nginx
Subject: Re: Re: How to control the total requests in Ngnix
On Thu, Nov 30, 2017 at 08:04:41PM +0800, tongshushan at wrote:
Hi there,
> 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.
Any $variable might be different in different connections. Any fixed
string will not be.
  limit_conn_zone "all" zone=all...
for example.
Francis Daly        francis at
nginx mailing list
nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list