TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A faster Web server: ripping out Apache for Nginx

10 点作者 owlmusic超过 13 年前

1 comment

X4超过 13 年前
Nginx is nice, I also use it on production, I heard lots of good things about Lighttpd too and spent some days tweaking both. With Lighttpd I was getting near similar results in much less time than it took me to optimize Nginx. I didn't forget to tune sysctl.conf, which helped to get 28k req/s with Nginx and about 24 req/s with Lighttp on a XEN VPS with 512MB RAM and 4xIntel(R) Xeon(R) CPU L5520 @ 2.27GHz.<p>I am curious what his results would be when he used higher concurrency. I used this 100byte benchmark (ab is single threaded, that's why weighttp is better):<p>ab -n 1000000 -c 1000 -k "<a href="http://example.org/100.html" rel="nofollow">http://example.org/100.html</a><p>weighttp -n 1000000 -c 1000 -t 4 -k "<a href="http://example.org/100.html" rel="nofollow">http://example.org/100.html</a><p>Anyway I think this benchmark isn're representative. He benchmarked a random sized static file only. Instead of using 100byte, a 1kb file and a simple hello world php. Why a simple hello world php example? Because that's the lightest examples that you do and it can show you the upper limit easier than a full-blown example. Of course having a benchmark of a full-blown example like a CMS, or eCommerce system woudn't harm either.<p>Here you find a much better and more trustworthy benchmark that actually compares different web servers and doesn't just blame apache. <a href="http://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-which-server-to-use/" rel="nofollow">http://nbonvin.wordpress.com/2011/03/24/serving-small-static...</a><p>I tried G-WAN myself on the same machine and I got about 65723 req/s, enough power.