New version of Apache HTTP Server released
blogs.apache.org
blogs.apache.org
Is there any more information on how they arrived at this conclusion?
The idea is that Apache features "multi-processing modules", which control how incoming connections are eventually translated into the state of the running program. These are not just simple tweaks to a fixed pipeline: it is possible to drastically alter the mechanism. As an example: mpm_winnt can be drastically different than the Unix implementations.
The original implementation was mpm_prefork, which maintains a pool of fork()'d processes to handle incoming connections. However, the more reasonable installations have used mpm_worker for years now, which keeps a pool of threads in each process (developed back when thread pools were the rage).
However, a while back someone built mpm_event, which uses the same underlying system calls that people use to build their "purely event-driven servers" to handle the sockets. This has been marked "experimental" for a while, initially due to bad interactions with other modules that weren't quite prepared to be evented (such as mod_ssl), but honestly it has been stable for years.
(I've been using it in production on a site with tens of millions of users, with SSL, and if anything mpm_event made things run better by working around a really irritating issue in Python: specifically, that until very very very recently the Python libraries simply failed to handle EINTR in a reasonable way; mpm_event seems to setup the signal and thread environment in a way that made me stop getting entire outgoing HTTP API requests to fail with EINTR ;P.)
The problem with Python was that it was not retrying: it would just throw an EINTR i/o exception from its lowest-level read() bridge, and then most of the code that called that would not catch the exception. The result would be that you'd make an HTTP request and the top-level GET call would just throw "EINTR": it is not reasonable (or even semantically valid) to have to retry the entire HTTP request because a call to read() happened to fail while streaming the response.
This was sufficiently ludicrous (and sufficiently simple to fix) that I had a patch I'd apply to Python's core libraries every time I installed or upgraded my system. ... and, before anyone tries to call me on "patch or GTFO": someone filed a bug, with a working patch (although people tried to quibble with it; I believe incorrectly, and it certainly didn't change the result), in January of 2007, and it wasn't resolved until mid-2010. I didn't come up with the fix: I just pulled it out of the bug tracker.
I just couldn't resist, I had to try it at once. It works! (no pun intented, for those who get the reference).
edit: fixed typo
Apache can be tweaked in so many different ways depending on what your traffic patterns look like, and how you're processing your requests. MaxClients / KeepAlive / MaxRequestsPerChild / etc...
e.g. you would have a completely different config for serving wordpress vs static images for a photo album.
I can't stress this enough. Besides all the configuration settings, you can really dig into the internals.
Our production deployment of Apache is custom-compiled with something like 90% of the modules disabled. Only the basic stuff we use.
Each deployment is unique, making benchmarks pretty useless.
If you need to choose which httpd to use, decide based on how easily it'll fit in your stack. I promise you, if you hit the performance ceiling on any of the httpd suites out there, you'll have bigger fish to fry.
Not that unique, as in snowflake-unique. There are several classes of deployments, that's all. A lot of things are similar.
That said, benchmarks still say a lot, when the performance gets over some limit. A 10-50% speed improvement could be alleviated with a different config. Even a 100%. I doubt a 10x one could. Or 1/5 the memory usage. Or getting to 20,000 rps on the same otherwise setup, while the other server stuggles after 4000 reqs.
Here's apache tuned to serve static files of 50kb in length, with 20 requests per client, 500 uniques per hour...
vs.
Here's apache tuned to serve a wordpress blog that gets 500 uniques per hour and each client makes 50 requests (average time on site is 5 minutes)...
and then...
apache serving wordpress on a VPS vs apache serving wordpress on a single core vs apache serving wordpress on a quad-core..
and oh-wait... if we're talking php then let's consider prefork/FastCGI/yada yada yada
The "problem" (or as I prefer to look at it: feature) with Apache, is that it's been around for so long, that it can accommodate all of the above specific issues.
I disagree that each deployment is unique though. In theory each deployment should be unique but most people just go with the defaults their hosting provider suggests, others don't have control over those setting (shared hosts) and still others just use the htaccess file that comes with html5BP and leave it at that. There's a ton of people That have a majority of the modules enabled but neither use them or know what they do too. I've been guilty of it before too. Maybe around these parts it's safe to say each deployment is unique but out in the wild you tend to see a lot of the same.
For 99% of all LAMP implementations, the performance of the stack is not an issue.
The most important thing is to know how to use your stack. It doesn't matter what the stack actually is.
Event MPM seems unreliable :-(
http://news.netcraft.com/archives/2012/02/07/february-2012-w...
You run the distro provided Nginx? Or the distro Ruby/Python/etc?
Really?