nginx limit_req��������
[����]WIKI��http://wiki.nginx.org/HttpLimitReqModule©Ͱԭ����leaky bucket����http://en.wikipedia.org/wiki/Leaky_bucket#���û�������IP��ַ����������©Ͱ����������1-3req/sec��Ͱ�ռ�1m��1M�ܱ��ִ�Լ16000��(IP...
WIKI��
http://wiki.nginx.org/HttpLimitReqModule
©Ͱԭ����leaky bucket����
http://en.wikipedia.org/wiki/Leaky_bucket
#���û�������IP��ַ����������©Ͱ����������1-3req/sec��Ͱ�ռ�1m��1M�ܱ��ִ�Լ16000��(IP)״̬
limit_req_zone $binary_remote_addr zone=qps1:1m rate=1r/s;
limit_req_zone $binary_remote_addr zone=qps2:1m rate=2r/s;
limit_req_zone $binary_remote_addr zone=qps3:1m rate=3r/s;
server {
#����qps=1����ֵburst=5���ӳ�����
#�ϸ�����©Ͱ����qps=1����ÿ������
#�ڷ�ֵburst=5���ڵIJ������ᱻ�������ӳٴ���
#����������������ֱ�ӷ���503
#�ͻ���ֻҪ���Ʋ����ڷ�ֵ[burst]�ڣ��Ͳ��ᴥ��limit_req_error_log
# ��1������һ����������=6���ܾ�1��������1���������ӳٶ���4����
#time request refuse sucess delay
#00:01 6 1 1 4
#00:02 0 0 1 3
#00:03 0 0 1 2
#00:04 0 0 1 1
#00:05 0 0 1 0
location /delay {
limit_req zone=qps1 burst=5;
}
#����qps=1����ֵburst=5�����ӳ�����
#����nodelay֮����©Ͱ����һ��ʱ���ڵ�ƽ��qps = ©Ͱ���ʣ�����˲ʱ�ķ�ֵqps > ©Ͱqps
#���Է�ֵʱ������qps=(brust+qps-1)=5
#���ᱻdelay��Ҫô������Ҫôֱ�ӷ���503
#�ͻ�����Ҫ����qpsÿ�����������Ų��ᴥ��limit_req_error_log
# ��2��ÿ��5�뷢��һ�δﵽ��ֵ�IJ�������������ʱ������ƽ��qps=1 ������Ȼ����©Ͱ���ʣ�
#time request refuse sucess
#00:01 5 0 5
#00:05 5 0 5
#00:10 5 0 5
# ��3������ÿ�뷢������=5������ʱ������ƽ��qps>>1�����������ܾ���
#time request refuse sucess
#00:01 5 0 5
#00:02 5 4 1
#00:03 5 4 1
location /nodelay {
limit_req zone=qps1 burst=5 nodelay;
}
}
- ת����ע����Դ��ITѧϰ�� ��ַ��http://www.t086.com/ �����������Ƽ�������
- �ر������� ��վ�������ر�������ֹת�ص�ר�������������¿�������ת�أ���������ע��������ԭʼ���ߡ����°�Ȩ������ԭʼ�������С����ڱ���վת�����µĸ��˺���վ�����DZ�ʾ������л�⡣������վת�ص������а�Ȩ��������ϵ���ǣ����ǻᾡ�����Ը�����
- �������е���ɫ
- �������ж�IP��ַ��A��B���C��
- ������ϵ��Ц�� (ʷ����ȫ��
- ��Google���������ŵ���ͨv4.0
- ���ٶ�ͳ��URL��hm������utm�����Ķ�Ӧ��ϵ
- ��ƻ������MACbook Air���ݼ���ȫ
- ��Linux��ʹ��host��dig��nslookup��ѯDNS
- ���������ԡ���װ Windows XP ����ϵͳ��ͼ��ȫ����
- �����Լ���VPS�Google��������
- ��С�ڴ�VPS֮Nginx+PHP-fpm�߸����Ż���ѹ�����Է���
- ������������������̸�����ɶ��ر�
- ��������������ѡʳƷ����2020�ļ��ȵ�Ͷ�ʲ��Ժ���������
- �����ڵ�����֤50���ƴ�50����ָ֤�������Ĺ���
- ����֤50����Щ��Ʊ_��֤50Ȩ����������
- ������300����֤50����֤500��ָ��2019���ڶ��ζ��ڵ���������
- ������300��ֵ/�ɳ�ָ�����Ʒ����������й�ƽ��Ȩ���½�
- ����ָ֤��������֤50��ָ��������
- ����ָ֤��������֤����ָ��������
- ����ָ֤��������֤100ָ��������
- ����ָ֤����������300ָ��������