How can I detect and survive being “Slashdotted”?

前端 未结 24 1866
半阙折子戏
半阙折子戏 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:56

    Cache... hard. Record hits, and if a spike occurs, write out a completely static copy of the page being hit, then serve that. Cutting DB queries from 100 to 2 with a good caching system can survive a weak slashdotting, but having any DB queries at all will still result in a dead site under serious load that you aren't prepared for.

提交回复
热议问题