Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

anyone has any idea how we optimize the connection between Apache and tomcat, i am using mod ajp and therefore apache forwarding the request to tomcat, but my tomcat apps contains many images which take more bandwidth, how we can optimize this ?

share|improve this question

Your question is quite unclear, but my humble guess is that you could use Apache's mod_cache to cache the Tomcat stuff.

share|improve this answer

You can increase the number of threads allocated by Tomcat using the maxThreads attribute in server.xml. You should also read about the MaxClients setting in Apache, it usually needs to be set in conjunction with Tomcat's maxThreads.

Another way to make things faster would be to drop Apache and serve everything directly from Tomcat. Of course this is only possible if you don't need Apache for anything else, like PHP, URL rewriting, proxying, etc.

For a good book about Tomcat configuration, I suggest Tomcat: The Definitive Guide, by J. Brittain, I. Darwin. It's a few years old and mainly about Tomcat 6, but I believe most of it is still true for Tomcat 7.

share|improve this answer

Either use mod_cache as suggested by @Janne Pikkarainen, or move the images directly into the Apache HTTPD htdocs tree and avoid proxying requests for them to Tomcat at all. Cuts down the size of your web-app too ;-)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.