request processing time- JBoss and mod_jk
nk83 Oct 12, 2011 7:07 PMHi
My web application architecture is: Apache 2 (as load balancer) + JBoss 3.2.3 + MySQL 5.0.19.
I want to: measure the request processing time (for every individual request) spent on the JBoss server only (i.e., excluding time spent on Web and database servers.
I've been researching about how to log request processing time on an application tier only. I found *mod_JK logging*, *Apache's mod_log_config* and Tomcat *AccessLogValve* as two possible methods.
Using *mod_JK logging*: my understand mod_jk logging provides request processing time for each request and calculate as time difference between time when a request leaves the Apache server and time when the corresponding response received by the Apache server. Please correct me if this not accurate/correct.
Using Apache's mod_log_config model ([http://www.lifeenv.gov.sk/tomcat-docs/jk/config/apache.html][1]): by adding "%{JK_REQUEST_DURATION}n" in the LogFormat (the JKLogFile construct) construct see ([http://www.lifeenv.gov.sk/tomcat-docs/jk/config/apache.html). The "JK_REQUEST_DURATION" capture overall Tomcat processing time from Apache perspective.
The times (in the above cases) includes Tomcat/JBoss + MySQL processing time. It won't help in my case as it includes MySQL processing time- I want to record request processing time on JBoss only. Any suggestions/ideas are appreciated?
Using *AccessLogValve*: it can log "time taken to process request, in millis" by setting %D in the pattern attribute of the AccessLogValve XML construct. It is not very clear if this
- Time if this time is the time required by tomcat/JBoss to serve a
request (e.g., allocate thread worker to handle it)
- Time taken to process a request and send it to the database server
(overall time on Tomcat/JBoss server)
- Time taken to process a request by Tomcat/JBoss and send a response
back to a Web server/client
Any idea/clue?
Or Any other better ways to measure processing time at JBoss server only for each individual request
Thanks for your time
[1]: http://www.lifeenv.gov.sk/tomcat-docs/jk/config/apache.html