IIS 7 - HTTP 连接数重要吗?
我正在优化一个非常受欢迎的网站,由于用户群不断增长,我对扩展方面的重要因素感兴趣。
目前,我正在通过向服务器添加更多 CPU 功率/RAM 内存来进行扩展。这效果很好 - 尽管该网站非常受欢迎,但当前 CPU 使用率为 10%。
所以,如果可以的话,我会继续这样做。我担心的是我是否会达到 CPU 使用率低但用户由于 HTTP 连接数而出现连接问题的地步。通过向集群添加更多服务器来水平扩展是否更好?
谢谢!
I'm optimizing a very popular website and since the user base is constantly growing I'm interested in what matters when it comes to scaling.
Currently I am scaling by adding more CPU power / RAM memory to the server. This works nicely - even though the site is quite popular, currently CPU usage is at 10%.
So, if possible, I'd keep doing that. What I am worried about is whether I could get to the point where CPU usage is low but users have problems connecting because of the number of HTTP connections. Is it better to scale horizontally, by adding more servers to the cluster?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最终,仅添加更多内存是不够的。 TCP 而非 IIS 有并发连接限制(尽管这两个因素都考虑在内,但 IIS 可以毫无压力地处理大约 3000 个连接)。
您可能不会遇到您所建议的 CPU 使用率低但 HTTP 连接数高的情况,除非它是一个主要是静态的站点,但打开的连接越多,CPU 使用率就越高。
但不管怎样,对于一个受欢迎的网站来说,你需要的是冗余,这对于拥有大量用户群的网站来说是至关重要的。对于用户来说,没有什么比您的唯一服务器由于某种原因离线而导致站点关闭更烦人的了。如果负载均衡器后面有 2 台服务器,您可以扩展站点,甚至可以使服务器脱机,而不必担心站点脱机。
Eventually just adding more memory won't be enough. There are concurrent connection limits for TCP rather than IIS (though both factors do come into account, IIS can handle about 3000 connections without a strain).
You probably won't encounter what you suggest where the CPU usage is low but number of HTTP connections is high unless it is a largely static site, but the more connections open, the higher the CPU usage.
But regardless of this, what you need for a popular site is redundancy, which is essential for a site which has a large user base. There is nothing more annoying to the user than the site being down as your sole server goes offline for some reason. If you have 2 servers behind a load balancer, you can grow the site, even take a server offline with less fear of your site going offline.