32.5. Managing mod_cluster Deployments for JBoss EAP 5 (Tech Preview)
mod_cluster
module provides intelligent, dynamic load balancing for web applications. There are two halves to mod_cluster
: one in the JBoss application server (which manages the web application contexts) and one in the HTTP server (which manages sessions and routing). JBoss ON monitors and manages the mod_cluster
module within the JBoss server.
32.5.1. About mod_cluster
mod_cluster
is an HTTP load balancer that provides a level of intelligence and control over web applications that is not available with other HTTP load balancers. mod_cluster
has lots of features that improve performance and management, but two are crucial:
- By using multicast (advertising),
mod_cluster
signals workers what proxy servers are available, so workers can register themselves dynamically with the cluster domain. - Using a special communication layer between the JBoss server and the HTTP server,
mod_cluster
can not only register when a web context is enabled but also when it is disabled and removed from load balancing. This allowsmod_cluster
to handle full web application life cycles.
mod_cluster
is in the product documentation at http://www.jboss.org/mod_cluster.
mod_cluster
has two modules: one for the HTTP server which handles routing and load balancing and one for the JBoss server to manage the web application contexts. Both modules must be installed and configured for the cluster to function.

Figure 32.3. The mod_cluster Topology
mod_cluster
domain is imported as a child resource for the JBoss server. The web application contexts are listed as children resources for the cluster, with contexts as children within the mod_cluster
module.

Figure 32.4. The mod_cluster Resource Hierarchy
Important
mod_cluster
module in the HTTP server is configured externally from JBoss ON and is not managed by JBoss ON.
mod_cluster
module in the JBoss server can be managed by JBoss ON, and it is critical that the cluster is properly configured in order for JBoss ON to manage its resources. JBoss ON detects mod_cluster
like any other JMX resource (such as Hibernate).
mod_cluster
:
32.5.2. Managing mod_cluster
mod_cluster
properties provide direct management over how the mod_cluster
domain operates. Almost any part of the mod_cluster
configuration can be managed through JBoss ON, but two elements are critical for domain behavior:
- How the
mod_cluster
domain handles sticky sessions. Sticky sessions are enabled inmod_cluster
by default, but this can be disabled or its behavior can be changed through the configuration properties. - Enabling advertising (multicast).
mod_cluster
can send the JBoss information to any VirtualHost configured in the HTTP server. This allows workers to find the cluster and register themselves with the JBoss server dynamically.

Figure 32.5. Setting Server-Level Properties
mod_cluster
domain. The obvious ones that impact the web application contexts are enabling and disabling all contexts. The other options are used to reset the mod_cluster
domain after an error (reset the node) or reload the cluster configuration after making changes to the cluster properties.

Figure 32.6. Running Server-Level Operations
32.5.3. Managing Web Applications Contexts
mod_cluster
load-balancing cluster.
mod_cluster
domain.

Figure 32.7. Running Web Application Context Operations