Welcome! Log In Create A New Profile

Advanced

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn
November 30, 2017 09:14PM
my website is busier than I think I can handle



Tong

From: Peter Booth
Date: 2017-12-01 06:25
To: nginx
Subject: Re: How to control the total requests in Ngnix
So what exactly are you trying to protect against?
Against “bad people” or “my website is busier than I think I can handle?”

Sent from my iPhone

On Nov 30, 2017, at 6:52 AM, "tongshushan@migu.cn" <tongshushan@migu.cn> wrote:

a limit of two connections per address is just a example.
What does 2000 requests mean? Is that per second? yes,it's QPS.



童树山
咪咕视讯科技有限公司 研发部
Mobile:13818663262
Telephone:021-51856688(81275)
Email:tongshushan@migu.cn

发件人: Gary
发送时间: 2017-11-30 17:44
收件人: nginx
主题: Re: 回复: How to control the total requests in Ngnix
I think a limit of two connections per address is too low. I know that tip pages suggest a low limit in so-called anti-DDOS (really just flood protection). Some large carriers can generate 30+ connections per IP, probably because they lack sufficient IPV4 address space for their millions of users. This is based on my logs. I used to have a limit of 10 and it was reached quite often just from corporate users.

The 10 per second rate is fine, and probably about as low as you should go.

What does 2000 requests mean? Is that per second?


From: tongshushan@migu.cn
Sent: November 30, 2017 1:14 AM
To: nginx@nginx.org
Reply-to: nginx@nginx.org
Subject: 回复: How to control the total requests in Ngnix

Additional: the total requests will be sent from different client ips.



Tong

发件人: tongshushan@migu.cn
发送时间: 2017-11-30 17:12
收件人: nginx
主题: How to control the total requests in Ngnix
Hi guys,

I want to use ngnix to protect my system,to allow max 2000 requests sent to my service(http location).
The below configs are only for per client ip,not for the total requests control.
##########method 1##########

limit_conn_zone $binary_remote_addr zone=addr:10m;
server {
location /mylocation/ {
limit_conn addr 2;
proxy_pass http://my_server/mylocation/;
proxy_set_header Host $host:$server_port;
}
}

##########method 2##########

limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
server {
location /mylocation/ {
limit_req zone=one burst=5 nodelay;
proxy_pass http://my_server/mylocation/;
proxy_set_header Host $host:$server_port;
}
}



How can I do it?




Tong
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 04:14AM

回复: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 04:16AM

Re: 回复: How to control the total requests in Ngnix

gariac November 30, 2017 04:46AM

Re: 回复: How to control the total requests in Ngnix

gariac November 30, 2017 01:56PM

Re: How to control the total requests in Ngnix

Francis Daly November 30, 2017 05:18AM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 06:54AM

Re: How to control the total requests in Ngnix

pbooth November 30, 2017 05:28PM

Re: How to control the total requests in Ngnix

gariac November 30, 2017 09:10PM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 09:14PM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 07:06AM

Re: Re: How to control the total requests in Ngnix

Francis Daly November 30, 2017 01:40PM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 10:20PM

Re: Re: How to control the total requests in Ngnix

Maxim Dounin December 01, 2017 08:48AM

Re: How to control the total requests in Ngnix

Maxim Dounin December 01, 2017 11:14AM

Re: Re: How to control the total requests in Ngnix

Francis Daly December 02, 2017 06:04AM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn December 02, 2017 11:00PM

Re: Re: How to control the total requests in Ngnix

Francis Daly December 05, 2017 03:54AM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn December 05, 2017 08:52PM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 11:54PM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn November 30, 2017 11:56PM

Re: Re: How to control the total requests in Ngnix

tongshushan@migu.cn December 02, 2017 04:58AM

Re: How to control the total requests in Ngnix

gariac November 30, 2017 11:18PM

Re: How to control the total requests in Ngnix

gariac December 01, 2017 09:46AM

Re: How to control the total requests in Ngnix

gariac December 03, 2017 04:10PM

Re: How to control the total requests in Ngnix

pbooth December 04, 2017 01:14AM

Re: How to control the total requests in Ngnix

pbooth December 04, 2017 04:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready