-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

On 10/14/2010 12:58 PM, laredotornado wrote:
> I haven't done any benchmarks, and I'm assuming some of the folks on this
> thread are the Tomcat developers and can speak first hand to the speed.

While I am not a Tomcat developer, I can speak to the performance of
Tomcat with regard to static files: if you use the APR or NIO connectors
with sendFile="true", your performance will be on par with Apache httpd.
The blocking (default) connector has pretty horrible performance,
comparably.

That being said, I have tested a variety of static file sizes, and if
you have files that are less than about 64KiB in size, it doesn't matter
what connector you use.

*I'll repeat that for emphasis: all connectors perform the same with
static files up to about 64KiB in size.*

My tests were done against Tomcat 6.0.20 and Apache httpd 2.2.11.

> If so, I would encourage you to update the wiki...
> 
> http://wiki.apache.org/tomcat/FAQ/Connectors
> 
> because it mentions that Apache is faster at serving static content than
> Tomcat for high-traffic sites.

It says that "historically, Apache httpd has been faster".
Unfortunately, it does not say that this is no longer true.

There's also another piece of this puzzle: the use of Apache httpd makes
all your dynamic requests that must be proxied to Tomcat slower. So, the
question is this: do you get more static of dynamic requests? If you get
more static requests than dynamic requests, maybe running Apache httpd
out front might make sense. If you have only a few static requests and
mostly dynamic ones, you may be optimizing 1% of your traffic and
de-optimizing 99% of it.

There is also another option: use an image server. Don't put your static
files on the same server as your (dynamic) webapp. Then, have that other
server serve those files hopefully faster.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky3UrgACgkQ9CaO5/Lv0PC5sQCfbd9VQh10Fj93LwcTB1x4wAmg
dBkAoMQGaQUFPyntawbVDaFSt4YTThCK
=CQ2+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to