A Web Server Comparison
|
 |
Visited: 791 |
|
|
| 3.1/5.0 (8 votes total) |
|
|
|
|
by Ross McKillop June 26, 2004
|
Almost 70% of sites on the internet are served by Apache, a completely Open Source,
free web server. Quite an achievement for open source software, especially
considering Microsoft's share is less than 20%
There are other
web servers of course, which all provide various other features... I considered
quite a few alternatives when building this new server, all of course are
Open Source.
The Apache Servers
The biggest, and arguably still the best, web server is Apache which is now
available in two variants - Apache 1.3 and Apache 2.0, both have their
advantages and disadvantages.
Apache 1.3
A long running, well established, and stable web server that is considered
pretty much the standard now.
I have always
used apache, for all of my previous sites and servers, and have now come
to understand most of it's configuration very well. Also, Apache 1.3 is still
considered the most stable platform for PHP, and it's VirtualHost support
and the power of .htaccess files for site and even directory specific configuration
make it an excellent server for shared hosting.
Apache is the
default web server on most Linux distributions, Including my new distro of
choice - Debian. This would make it wonderfully simple to install (i.e. do
nothing, it's already there) and also I could simply copy across all the
old config files and, in theory, they'll work.
On the downside,
Apache 1.3 is now showing it's age, and is surely soon to be discontinued
now that Apache 2.0 is stable. Therefore, I have decided not to continue
to use Apache 1.3.X on my servers.
At present this
server is running Apache 1.3, despite what's said above... explained later
Apache 2.0
Apache 2.0 complete rewrite of Apache, only recently considered stable enough
for production use, destined to replace the Apache 1.3.X server through
time.
At the time of
writing, the latest version is 2.0.48, which is their 11th Public Release.
I have found Apache 2.0 to be completely stable, even with PHP 4.3x, despite
the various bugs that have been reported at times with that combination.
Obviously, having
PHP is of the utmost importance to me, considering this whole site (and every
other one i've built!) uses it.
Debian doesn't
have a package yet for PHP for Apache 2, although Apache 2 itself is there..
I have found a third-party package that provides php4 as a module for Apache
2.0 in Debian, which works great!
Apache 2.0 uses
completely different configuration files, which I must admit I prefer, which
are close enough to the Apache 1.3 ones that it's not difficult to migrate
or to learn to use the new configs.
I had decided
to use Apache 2.0 as the primary web server on this server, but it's now
changed back to 1.3.X... explained later!
Caudium (Roxen)
Caudium is a completely Open Source web server based on Roxen, with a few unique
and very powerful features. I like this server, but it's very different
from Apache, and indeed any other web server, It's mainly configured from
a web interface, allowing virtual sites to be set up easily.
Where Caudium
is truly unique is in it's modules. There are modules for almost everything
including the nice tag which renders text graphically (as a PNG), there are
also tags for generating 'business' graphics (charts, graphs etc...) and
for image manipulation. The RXML markup even supports if / then / else statements
and even SQL queries.
There is even
a photo gallery modules which, with one tag, will look through a folder of
images and generate clickable thumbnails and prev/next links. For rapid development
of dynamic site (including nice headings, and tab-based navigation) there
is no better platform, It's easy to learn, fast and powerful
However, Caudium
cannot handle the same load as Apache, it isn't as efficient, particularly
when it comes to running PHP within pages. And I don't want to be developing
sites which require a specific web server, it seems to defeat the purpose
of everything following standards, I can take this site and deploy it on
any server so long as it supports PHP4, if I used the extra tags offered
by Roxen/Caudium, this wouldn't be possible.
Caudium is installed
on this server, mainly as a development environment which I also occasionally
use for generating images, which I then save as static files and can include
them in pages served by the standard Apache 2.0 server. It also enables me
to host sites that require Caudium for others
thttpd
thttpd is used by several big names including Demon Internet and Global Internet,
it's also used by mtv.com and a couple of the leading banner ad companies.
thttpd also includes
a couple of unique features not found in any other web server (at least without
extra modules) including URL-based Traffic Throttling.
Where thttpd really
excels, is in it's speed and load it can take before slowing down or dropping
connections. It's also incredibly efficient in it's use of system resources,
which is always a good thing.
thttpd is only
around 400k (as opposed to Apache which is nearer 6Mb) and has only 7,230
lines of source code. It is incredibly secure, fast, and can handle 720 requests
per second (for small files) as opposed to around 300 with Apache. Additionally
thttpd is considered very secure.
So why ain't I
using it?, Firstly it's not ideal for PHP-based sites, Apache and even Caudium
have much better support for PHP and are more flexible. Besides, the upstream
on this server could never serve 1000 simultaneous connections, so although
I can understand why Demon need something this scalable on their web servers,
I dont.
Notes on Apache
2.0
I say above that I like, and use, Apache 2.0 yet this site uses Apache 1.3.
Why? The aforementioned third-party module provides PHP support, but not MySQL
support. I will not compile it myself, because it confuses Debian's package
manager. So until Debian releases a php4 module for Apache 2 in the official
sources, I'm sticking to 1.3...
I will, of course,
move as soon as that module appears! |