TomcatExpert

Delays between Apache and Apache Tomcat

 

Our configuration consists of the following components (all of them are running on a single Windows Server 2003 machine):

  • Apache Web Server - version 2.2.16 (with mod_jk version 1.2.31)
  • Tomcat Server - version 5.5.30

We are load testing the server with relatively simple requests.
It seems that under load (~8000 requests we are sending per minute from our load simulator) - we have a delay between apache web server and the mod_jk component.

We enabled the following types of access logs: apache, mod_jk, tomcat.

In tomcat and in mod_jk access logs we always see response times of 0 seconds.
However in apache_access we almost always see response times of 3-6 seconds for the matching requests.
We figured out that these delayed requests arrive to apache at a time X, but arrive to mod_jk/tomcat only at time X + (3-6 seconds).

We are trying to figure out what is causing these delays.

We tried switching from mod_jk to mod_proxy and mod_proxy_ajp, however we didn’t see any major gain in the performance.

On the other hand, when we “disabled” apache and configured tomcat to act as web server (in addition to its role as a java servlet container) the response times were very fast and stayed at the 0 seconds zone.

asked by nir.zilberman

question

Make sure you configure both Apache httpd and mod_jk to handle the traffic.

This means, the number of threads(workers) that httpd has will impact your system.

Also, in high concurrency, how you configure KeepAlive is important. There is a chance that Apache is using its threads waiting for the next request on idle connections, while active connections are not being handled. 

Posting your configuration files may be a good idea.

 

best

Filip

answer

answered by fhanik on June 15, 2011 07:09 PM

Filip Hanik is a Senior Software Engineer for the SpringSource Division of VMware, Inc. (NYSE: VMW) and a key participant in the company's Apache Tomcat initiatives. Filip brings 15 years of extensive experience in architecture, design and development of distributed application frameworks and containers and is recognized for his top-quality system development skills and continuous participation of Open Source development projects. Filip is an Apache Software Foundation member and a committer to the Apache Tomcat project where he is a leading authority on Tomcat clustering and a key contributor to the core of the platform. Filip has made contributions to software initiatives for Walmart.com, Sony Music, France Telecom and has held a variety of senior software engineering positions with technology companies in both the United States and Sweden. He received his education at Chalmers University of Technology in Gothenburg, Sweden where he majored in Computer Science and Computer Engineering.

Comments

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.