Back in the days of February 2003 I (Jan) was finishing my thesis. Writing
a thesis is as far as I can say the most frustrating job you can do.
While my subject was great (‘Development of a handheld system to monitor and
control CAN-bus systems in a non-automative environment’) and the hard- and
software development was a real challenge I had to write the thesis which
documented the design-decision, the preparations and so on.
For a developer this is the real hard part: writing the documentation. Especially
as the date when you have to finish the thesis gets nearer every day. To motivate
yourself you need a distraction.
For me it was a proof-of-concept of the c10k problem
written by Dan Kegel. How to handle 10000 connections in parallel on one server.
I already had seen apaches killing systems because they ran out of memory into swap
with only 100 parallel connections.
In the first weeks it was only a challenge how to write something fast, optimized.
In the ChangeLog you can still see my comments how to achieve this. Cache as much
as you can. Why regenerated the timestamp for the ‘Date:’ header 1000 times per
second if it is the same all the time ?
As I needed PHP support for my own purposes it was one of the first features added.
The ChangeLog says I had it working two weeks are the rest was done. Including
the load-balancing to distribute the load from one webserver to multiple fastcgi-backends.
At one point I asked myself: This is just a proof-of-concept. Where are we now ?
How do we compare to the other servers ?
The first opponent was thttpd, the big single-threaded webserver. Especially on
large files we outperformed it 2 to 5 times. Next were boa and mathopd, both with
problems and slower. Zeus was the first real challenge and they proof that Zeus is
a great webserver. If you want to spend money on a webserver (next to asking
me to develop something for you) is buying licenses from Zeus. (no, I’m not payed by them
in any way).
Different optimisations were added: new event-handlers like epoll and kqueue, new
network backends like sendfile().
So, I look back now on 2.5 years of development see the numbers of installations rising
every month. http://news.netcraft.com/ is telling as every month that the
numbers are still increasing and I send a mail to the mailinglist, so everyone
know and keeps up the joy that this little proof-of-concept went into a well working