如何检测和生存是" Slashdot的"? [英] How can I detect and survive being "Slashdotted"?

查看:163
本文介绍了如何检测和生存是" Slashdot的"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是生存异常高流量高峰的好办法?

我的想法是,在某些触发,我的网站应暂时切换到低带宽模式:切换到基本的HTML页面,最小的图形,禁用可能会放在数据库不必要的负载部件等上<。 / p>

我的想法是:


  • 监控CPU使用率

  • 监视带宽

  • 监视请求/分钟

编辑:我所熟悉的像缓存选项,切换到静态内容或内容交付网络等为手段,以生存,所以也许问题应更注重如何One检测当网站即将成为重载。 (虽然其他生存方法的答案当然是仍然欢迎。)让说,该网站是在Linux和PHP运行Apache。这可能是最常见的配置和应允许的人的最大数量从答案获得帮助。让我们还假设昂贵的选项,如购买其他服务器和负载均衡不可用 - 对于大多数人来说,至少在Slashdot提及将是一次在一个千载难逢的发生,不是我们可以花钱preparing的。


解决方案

  1. 安装穆宁监视负载/内存消耗等,并通知上重载。

  2. 安装的monit重启Apache2的,如果它崩溃

  3. 安装的nginx作为前端的Apache2,它会大量减少重负载下的内存要求

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: switch to basic HTML pages, minimal graphics, disable widgets that might put unnecessary load on the database, and so-on.

My thoughts are:

  • Monitor CPU usage
  • Monitor bandwidth
  • Monitor requests / minute

Edit: I am familiar with options like caching, switching to static content or a content delivery network, and so on as a means to survive, so perhaps the question should focus more on how one detects when the website is about to become overloaded. (Although answers on other survival methods are of course still more than welcome.) Lets say that the website is running Apache on Linux and PHP. This is probably the most common configuration and should allow the maximum number of people to gain assistance from the answers. Lets also assume that expensive options like buying another server and load balancing are unavailable - for most of us at least, a mention on Slashdot is going to be a once-in-a-lifetime occurrence, and not something we can spend money preparing for.

解决方案

  1. install munin to monitor load/memory consumption etc and notify on overloads.
  2. install monit to restart apache2 if it crashes
  3. install nginx as apache2 frontend, it will massively decrease memory requirements under heavy load

这篇关于如何检测和生存是&QUOT; Slashdot的&QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆