Lighttpd 代替 Apache
毫无疑问,Apache 是与 PHP 一起使用的最流行的 Web 服务器,而且它的性能确实非常出色。不过我很想知道使用 Lighttpd 而不是 Apache 有什么优势(如果有的话)。 谢谢。
No doubt Apache is the most popular web server to use with PHP and definately it works great. However I'm curious to know what are advantages (if any) to use Lighttpd instead of Apache.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
理论上,由于 Lighttpd 占用空间较小,因此应该允许更多用户使用与 Apache 完全相同的资源同时访问站点。
作为例子(只是为了证明这一点,这不是真实的数字)
在相同的硬件上,Apache 将允许 100 个用户同时查看您的页面,
而 Lighttpd 则允许 150 个。Lighttpd
还具有不同的映射过程方案,因此当访问者数量激增时,它会提供更好的服务。
每个服务器和网页的编写方式都不同,因此很难预测每个服务器的执行情况:
a) 您的特定硬件,最好联系您的托管公司并询问他们在其硬件上使用的建议
b) 您的软件 CPanel 的 Plesk 的执行方式与 Lighttpd 安装的干净 Apache 不同
c) 您的网站内容(包含大量图片的网站)与提供视频的服务器具有不同的指纹。
d) 您的处理器核心
Theoretically, because of a smaller footprint Lighttpd should allow more users to visit site at the same time using exactly the same resources as Apache would.
As example (just to prove the point, this is not the real numbers)
On the same hardware Apache would allow 100 users to view your page at the same time,
while Lighttpd would allow 150.
Lighttpd also has a different scheme of mapping processes, so it would serve better when the number of visitors is spiking.
Every server, and webpage is written differently, so it is very hard to predict how each of these servers would perform on :
a) your specific hardware, it is good to contact your hosting company and ask what they advice to use on their hardware
b) your software, Plesk of CPanel would perform differently than clean Apache of Lighttpd installation
c) Your site content, site with a lot of pictures has different fingerprint than server which serves video.
d) Your processor cores
他们声称更好的可扩展性是他们的主要优势 http://www.lighttpd.net/benchmark/
They claim to scale better as their main advantage http://www.lighttpd.net/benchmark/