1, user brush interface, resulting in high machine load, how to deal with it?
Workaround 1:
Limit the maximum number of links for a single IP to access 80 ports via Iptables
Iptables-a input-p TCP--dport 80-s 192.168.1.1-m connlimit-conlimit-above 5-j REJECT
Reference Blog: http://blog.uinion.com/?p=272
Workaround 2:
With Nginx_waf control, you can also
2. Select Nginx Access.log within 10 minutes to get the following data
10 most visited IPs, ascending output
ng_log= '/usr/local/nginx/logs/access.log '
Find ${ng_log}-mmin-10 | awk ' {print $7} ' | Sort-rn | uniq-c | Head-10
3. View server network Connection Status
Netstat-ant | awk '/^tcp/{++s[$NF]}end{for (A in S) print A,s[a]} '
4. View the number of server network connections
Netstat-ant | grep established | Wc-l
This article is from "YHT's operations Notes" blog, please make sure to keep this source http://yht2017.blog.51cto.com/9014030/1903303
Linux common face question 4