I sent the test requests from only one client.
童树山 咪咕视讯科技有限公司 研发部 Mobile:13818663262 Telephone:021-51856688(81275) Email:[email protected] From: Gary Date: 2017-12-01 12:17 To: nginx Subject: Re: How to control the total requests in Ngnix I thought the rate is per IP address, not for whole server. From: [email protected] Sent: November 30, 2017 7:18 PM To: [email protected] Reply-to: [email protected] Subject: Re: Re: How to control the total requests in Ngnix 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: 127.0.0.1, 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 ? 童树山 咪咕视讯科技有限公司 研发部 Mobile:13818663262 Telephone:021-51856688(81275) Email:[email protected] 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, [email protected] 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. So: limit_conn_zone "all" zone=all... for example. f -- Francis Daly [email protected] _______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
