apache - 适用于世界上非 Twitter 的低延迟 Web 服务器/负载均衡器

标签 apache nginx jetty load-balancing latency

多年来 Apache httpd 一直让我受益匪浅,在我一直维护的传统自定义 LAMP 堆栈应用程序中坚如磐石且高性能(阅读:试图摆脱)

我的 LAMP 堆栈日子已经屈指可数了,我正在进入多语言的奇妙世界:

1) Scala REST framework on Jetty 8 (on the fence between Spray & Scalatra)
2) Load balancer/Static file server: Apache Httpd, Nginx, or ?
3) MySQL via ScalaQuery
4) Client-side: jQuery, Backbone, 320 & up or Twitter Bootstrap

选项 #2 是这个问题的焦点。我看到的基准测试表明,Nginx、Lighthttpd、G-WAN(特别是)和 friend 在性能方面击败了 Apache,但这种领先似乎在 Web 服务器处理许多同时连接的高负载场景中表现得更加明显。鉴于我们的服务器每月最大带宽为 100GB,平均负载约为 0.10,高负载场景显然不起作用。

基本上,我需要与应用程序服务器(Jetty)的连接以及 Web 服务器的静态文件传递既可靠又快速。最后,Web 服务器应该兼任应用程序服务器的负载平衡器(不需要 SSL,服务器位于 ASA 后面)。我不确定 Apache Httpd 与其他替代方案相比有多快,但它是经过验证、经过公路战士测试的软件。

那么,如果我使用 Nginx 或其他 Apache 替代方案,在可见性能方面会有任何差异吗?我认为不是,但为了实现近乎即时的页面加载,将问题提出来;-)

最佳答案

if I roll with Nginx or other Apache alternative, will there be any difference whatsoever in terms of visible performance?

是的,主要是在延迟方面。

根据 Google(他们可能对延迟有所了解),延迟对于用户体验、高搜索引擎排名以及承受高负载(成功、脚本小子、真实攻击等)都很重要。 .

但是扩展多核和/或使用更少的 RAM 和 CPU 资源不会有什么坏处 - 这就是这些 Web 服务器替代方案的目的。

The benchmarks I have seen indicate that Nginx, Lighthttpd, G-WAN (in particular) and friends blow away Apache in terms of performance, but this blowing away appears to manifest more in high-load scenarios where the web server is handling many simultaneous connections

基准测试显示,即使客户端数量较少,某些服务器也比其他服务器更快:here are compared Apache 2.4, Nginx, Lighttpd, Varnish, Litespeed, Cherokee and G-WAN .

由于此测试是由独立于这些服务器作者的人员进行的,因此这些测试(使用虚拟化和 1、2、4、8 个 CPU 核心进行)具有明显的值(value)。

关于apache - 适用于世界上非 Twitter 的低延迟 Web 服务器/负载均衡器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8671159/

相关文章:

java - Jetty 延续/AJAX 推送 : Timeout best-practices?

apache - PHP error_log 方法不会将错误写入我的错误日志文件

php - 与套接字超时相关的Apache2/http + MySQL/Wordpress加载问题

angularjs - $http.post Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers 错误

javascript - Angular HTML5 模式和 ui-router 返回 403

java - Jetty 启动需要多长时间?

ruby-on-rails - docker Apache 乘客 : error cannot load such file bundler/setup (LoadError)

apache - AH00161 : server reached MaxRequestWorkers setting, 考虑提高 MaxRequestWorkers 设置

http - 运行 uwsgi emperor 模式给出 nginx 错误

java - 从 java 代码运行 jar 文件