Project mod_cluster is a httpd-based load-balancer. It uses a communication channel to forward requests from httpd to one of a set of application server nodes. Unlike mod_jk and mod_proxy, mod_cluster leverages an additional connection between the application server nodes and httpd to transmit server-side load-balance factors and lifecycle events back to httpd. This additional feedback channel allows mod_cluster to offer a level of intelligence and granularity not found in other load-balancing solutions.
Mod_cluster boasts the following advantages over other httpd-based load-balancers:
- Dynamic configuration of httpd workers
- Server-side load balance factor calculation
- Fine grained web-app lifecycle control
- AJP is optional
JBoss AS 7/WildFly 8+
These versions already ship with bundled mod_cluster. It is configured via mod_cluster subsystem.
JBoss AS 6
This is the first version of AS that bundled mod_cluster, the configuration is located in
JBoss Web / Tomcat
tar.gz from the assembly contains the
- Extract the
- Copy the JAR files from
JBossWeb-Tomcat/libto the Tomcat lib.
- Remove the
mod_cluster-container-tomcat(n).jarthat don't correspond to the Tomcat version you are using.
- Copy the
JBossWeb-Tomcat/lib/jboss-logging-spi.jardependency jars into the same
confdirectory and add a non-cluster mode engine listener as documented here.
core container spi (contains no dependencies on a specific web container) tomcat (base for Tomcat container implementations, based on Tomcat 7.0) tomcat8 (Tomcat 8.0 container implementation) tomcat85 (Tomcat 8.5 and 9.0 milestone container implementation) demo client server
Servlet Container Modules
Before building, ensure you have Maven version 3.0 or newer (
mvn -version) and JDK 6.0 or newer (
It is possible to build modules for all containers:
mvn -P dist package
Dynamic load-balancing demo is located in the
This software is distributed under the terms of the GNU Lesser General Public License (see lgpl.txt).