I was reading through Tomcat: The Definitive Guide (2007 book) and
they have an interesting section where they benchmark all many
different tomcat configurations.
Google Books has a preview of the book online - and if this link
works - here's a link to page 151 where it is talking about the
performance of Tomcat vs Apache:
http://books.google.com/books?id=vJttHyVF0SUC&pg=PA18&dq=tomcat
+performance
+coyote&ei=IOnXR7_UFJL0iwGtx7HjAQ&sig=j13CqZ2xsKxN0b5UlZrh2Aaw1g8#PPA151
,M1
Basically, their benchmarks showed that Tomcat was FASTER than Apache
standalone at serving static content. This goes against literally
hundreds of websites that claim that Apache fronting tomcat (and
Apache serving tomcat's static content) is the best way to go...
They offer some thoughts on why this is the case, and they point
towards the JVM's hotspot runtime-optimizations giving Tomcat a clear
advantage over Apache. Yes, Apache is very well optimized, and
compiling it with compile-time optimization will give a bit of a
boost - but once it is compiled it wont ever get any more speed
boosts - whereas the JVM-version will...
(As an aside, it would be interesting to see if they were to run
Apache standalone being compiled to use the profile-based
optimizations... You can set up GCC to compile the program in such a
way that it dumps out information about how its methods are being
called... etc and then you can recompile it later on using those
output files as input for the optimizer - which would give you a more
targeted optimization similar to the JVM's hotspot - just not as
flexible, obviously)
In any case, reading that made me decide to switch my configuration
from using mod_jk or mod_proxy_ajp (my latest config was a half-baked
mod_proxy_ajp setup... I say half-baked because I could never get the
stupid thing to work reliably... despite my best efforts I would
always get 503 responses under even a light load) to using jsvc to
run tomcat on port 80.
There are some downsides to this approach... such as - when I am
taking tomcat down I don't get Apache sitting there telling people my
server is unavailable... they just get a blank page.
Fortunately, my server is really really fast, so it only takes me 20
seconds total to restart tomcat and most people wont even realize it
happened. :)
Ryan
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------