Wandering Thoughts archives


Why Apache is such a temptation

We all know the hulking monster of Apache. Encrusted with decades of history and baroque trim, it's not exactly renowned for being speedy or lightweight and it's famously common for it to explode your machine under load if it's not configured exactly right; in trying to be everything for everyone it does nothing particularly well (so it's commonly said). The usual prejudice is that everyone sensible uses a modern, lightweight web server that's designed for today's operating systems and web environments, something like lighttpd or nginx or a number of others. Only ignorant people still run Apache.

(Remember, I said this was a prejudice.)

Well. I've run Apache and I've run lighttpd, and the process of doing both has given me some opinions on this. The summary is that unless I'm in an unusual situation, the next web server I set up for myself will use Apache.

Apache has two large temptations. The first one is that whatever you want to do, Apache probably has support for it; with other web servers, you take your chances. Apache has a dizzying array of features and modules that cover a huge range of ground. A lot of people don't like this (it's part of what makes Apache a hulking monster), but it's tempting in just the same way that the GNU tools are.

The other temptation is that as part of the 'everything but the kitchen sink' approach, Apache generally does almost everything it can for you. My poster child for this is support for HTTP compression. Any number of web servers have modules for compressing static resources, but Apache goes the extra distance to also compress the output of CGI programs (and other dynamic resources). What this means in practice for us is that all of our users' CGI programs take advantage of HTTP compression; without this I'm pretty confidant that most of them wouldn't.

(If you use a big framework to implement your dynamic website, it probably has direct support for compression. But if you aren't using someone else's code, you're probably not going to implement compression yourself; there are a bunch of issues and most people don't have the time and interest. I certainly don't, which is why WanderingThoughts has HTTP compression and another DWiki instance I run elsewhere under Lighttpd doesn't.)

As a corollary of this, Apache is also the tempting choice if you're a sysadmin and you don't know just what features people will wind up needing or wanting. Since it has everything but the kitchen sink, you can probably give people almost anything they wind up asking for.

There are still situations where I'd use something other than Apache, but what they are is a sufficiently complicated issue that it needs another entry.

web/ApacheTemptation written at 01:08:24; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.