Red Hat Training

A Red Hat training course is available for Red Hat JBoss Operations Network

Chapter 16. Managing mod_cluster Deployments for JBoss EAP 5 (Tech Preview)

The 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.

16.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 allows mod_cluster to handle full web application life cycles.
More detail about the features of 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.
The mod_cluster Topology

Figure 16.1. The mod_cluster Topology

In JBoss ON, the entire 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.
The mod_cluster Resource Hierarchy

Figure 16.2. The mod_cluster Resource Hierarchy

Important

The mod_cluster module in the HTTP server is configured externally from JBoss ON and is not managed by JBoss ON.
The 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).
There are a number of resources available for installing and configuring mod_cluster: