How can I detect and survive being “Slashdotted”?

前端 未结 24 2134
半阙折子戏
半阙折子戏 2021-01-29 21:19

What\'s a good way to survive abnormally high traffic spikes?

My thought is that at some trigger, my website should temporarily switch into a \"low bandwidth\" mode: swi

24条回答
  •  甜味超标
    2021-01-29 21:34

    netstat -plant | awk '$4 ~ /:80\>/ {print}' | wc -l

    This will show you all of the connections to the Apache server. You can create a cgi script that will calculate the total number of connections to the Apache service and issue a warning once it reaches a certain threshold. What to do at that point is another question.

    Hopefully your server is prepared.

提交回复
热议问题