tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <>
Subject Re: why use mod_jk?
Date Fri, 24 Feb 2006 08:26:53 GMT
Brad O'Hearne wrote:
> After wasting time trying to configure mod_jk, I thought I'd just wipe 
> my mind free and just play dumb for a moment. If Apache can proxy 
> requests using mod_proxy, what is the benefit of using mod_jk as an 
> integration technique between httpd and tomcat,

Faster up to 50% over mod_proxy by using constant connection pool.
Uses AJP protocol (binary HTTP)
Load balancing
Graceful shutdown of nodes in the cluster
Hot standby
Domain model clustering

> if integration is *not* 
> in-process, which I understand is not recommended for Tomcat 5.5?

In-process integration is bad idea because most modern web servers
offer so called master-child mechanism, where the master process
monitors the child and recycles it in case of error.
If you put JVM inside web server process address space then you'll
be not able to have load balancing and multiple backend servers, and
if some cgi script kills your web server child process, it will kill
your application server as well.

Apache is using multiple child processes for serving requests, and
that would mean that you would need that many JVM instances.
Prefork mpm or Apache 1.3 creates a separate process for each client
connection, so for 100 concurrent client connections you would
end up with 100 JVM instances.

That's the reason why JNI was usable only on Windows or Netware which
mpm's have a single child process. Even on those, things like
MaxRequestsPerChild 10000 would try to kill the Tomcat after each 1000
requests. Since it would try to start a new instance befor killing the
old one, you'll end up in server crash.

So, totally unusable. Having process separation between web and
application server rises both stability and overall security.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message