Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The mod_proxy_ajp plugin is part of the modern mod_proxy* set of plugins. These have a consistent style of configuration. Implementors with mod_proxy experience will likely favor this plugin. The major concern with this module is it's relative age. There were buggy versions when it first appears around Apache 2.2.3. Sometimes packages are not kept current and these buggy versions may be deployed in your environment. It is suggested to avoid AJP and just use the mod_proxy_http module if mod_proxy* modules will be used.

Mod_Proxy_HTTP

 Mod_Proxy_HTTP load balances by directly passing HTTP packets on to the Tomcats. Optionally, HTTPS can be used to encrypt traffic. This approach closely resembles how Tomcats are configured to use hardware load balancers.

Load Balancing with Mod_Proxy_HTTP

Considerations

One consideration is whether to host Apache separately in it's own server or host it with a Tomcat (web container). Note that while the approach detailed below is specific to Apache and Tomcat, similar solutions for other containers should be easy to find. An advantage of having a Tomcat with Apache is that as long as the load balancing server is running correctly, it the service is available. Connection loss to other Tomcats, although performance will likely suffer. The downside is a potential that a flakey Tomcat on the load balancer may compromise the whole service if it brings down this critical server. The nice part of this decision is that configuring Tomcat local to Apache can be done the same as for remote Tomcats. They are  independent even with hosted on the same server.