Which web server would be more suitable for running a few instances of wordpress?
They are both pretty easy to setup, so I am wondering mostly about performance. Would there be a difference? I think nginx is faster for serving static files.
Which web server would be more suitable for running a few instances of wordpress?
They are both pretty easy to setup, so I am wondering mostly about performance. Would there be a difference? I think nginx is faster for serving static files.
I'd go with nginx, because I think it's a better long-term solution than lighttpd, and it's configuration format doesn't make me want to buy up stock in parentheses supply companies. As gekkz says, Wordpress is a dynamic app, so static file serving isn't the best benchmark to be relying on. I'd rate nginx's FastCGI proxying capabilities over lighty's too, though, and it doesn't leak like a sieve. For me, it's RIP lighty all the way these days.
Nginx is pretty fast for static files, but wordpress isn't all that static, unless you host your own media instead of using free image hosting services, in which case you might see nginx perform better than lighttpd.
Ideally, you would want to set up a caching plugin with your wordpress to decrease the number of DB queries, in which case both of them will be pretty much just as fast.
Barry Abrahamson says "For dynamic content, all of them are about the same performance-wise. There are some other advantages to using something like nginx + php-fpm. For example, php-fpm allows you to set some wall-clock timers for php processess (as opposed to cpu-time) at which you can either log and/or kill a php process after a certain amount of time. This is helpful for example, when a php process hangs opening a connection to a remote site. Apache + mod_php can’t do this."
http://serverqa.wordpress.com/2009/05/31/ask-your-questions-here/#comment-2
Honestly either should perform fine. Apache would as well, it's far better then most people give it credit for, once some of the default features are turned off (.htaccess being the worst) it's fine, and with mod_php
and a good opcode cache likely faster then a naive configuration of the others.
My last company I built a site that got 400M/day on a couple apache servers (not wordpress though)... The speed is negligible, and I find that the ease of apache and its ability to work with everything out ways any slight speed gains.
You need to recompile it with mpm=worker though when you get in the high millions.
For wordpress, make sure you have the wordpress "supercache" module if you expect any sort of high load.