1

I'm working on a site that is running on Tomcat 6. The customer seems overly concerned with the performance of the site, and I've also been given the impression that HTTPD is better (faster) at serving static content.

I've also heard that Tomcat6's standalone server uses APR, which is essentially HTTPD, so placing it on top of HTTPD might just introduce a (admittedly negligible) delay.

On a pure performance level, is there a significant difference? (I am aware that HTTPD will allow more flexibility and possibly security, but I am interested in the performance at the moment.)

1 Answers1

2

Trade-off.

Apache HTTP Server is almost certainly faster at serving static content than Tomcat - I don't have any nice graphs to back up that claim, but, Apache's written in C and Tomcat's in Java; C is generally faster.

However, keep in mind that having two web services is a resource drain in other ways - and neither of those web servers are known for their small memory footprint.

Whether it's worth the extra service, the extra TCP connections for proxied requests, and the extra complexity for what will likely be no larger than a few-millisecond gain.. it's questionable.

If your client does want to continue down this route, maybe look at non-Apache web servers with a smaller resource footprint for the static content/reverse proxy role, as well - nginx and lighttpd would probably both be good options.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248