Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much slower is serving static content from Tomcat?

So, I have a webapp with a fair amount of JSPs, servlets, alot of which are using IceFaces. Obviously, most of this will have to stay in Tomcat.

However, I've been told that static content (HTML, Images, etc.) is slower on Tomcat than a pure webserver like Apache. My understanding is that when you're using Tomcat as a stand-alone webserver, it's using a version of Apache in the first place. I may be mistaken on this, of course.

But what is the penalty for serving static images or files from Tomcat? Is it worth breaking out into its own webserver for a low volume site?

like image 438
Drew Avatar asked Mar 17 '09 15:03

Drew


People also ask

Can Tomcat serve static files?

Tomcat will serve any static content from a WAR file using the DefaultServlet.

Why is Tomcat so slow?

For Tomcat itself to run slow would mean that the VM it's running in was severely starved for resources. So, for example, if Tomcat is running slow, you should check to make sure that the machine that Tomcat is running on has enough physical RAM that it isn't thrashing virtual memory.


1 Answers

See the Tomcat Connector FAQ for some information. For modern versions of Tomcat, the performance difference is much smaller than it used to be. For a low volume site, there is no reason that you cannot supply all content with Tomcat.

like image 188
Eddie Avatar answered Oct 24 '22 13:10

Eddie