32.5. Managing mod_cluster Deployments for JBoss EAP 5 (Tech Preview)
mod_clustermodule 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_clustermodule within the JBoss server.
32.5.1. About mod_cluster
mod_clusteris 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_clusterhas lots of features that improve performance and management, but two are crucial:
- By using multicast (advertising),
mod_clustersignals 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_clustercan not only register when a web context is enabled but also when it is disabled and removed from load balancing. This allows
mod_clusterto handle full web application life cycles.
mod_clusteris in the product documentation at http://www.jboss.org/mod_cluster.
mod_clusterhas 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_clusterdomain 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
Figure 32.4. The mod_cluster Resource Hierarchy
mod_clustermodule in the HTTP server is configured externally from JBoss ON and is not managed by JBoss ON.
mod_clustermodule 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_clusterlike any other JMX resource (such as Hibernate).
32.5.2. Managing mod_cluster
mod_clusterproperties provide direct management over how the
mod_clusterdomain operates. Almost any part of the
mod_clusterconfiguration can be managed through JBoss ON, but two elements are critical for domain behavior:
- How the
mod_clusterdomain handles sticky sessions. Sticky sessions are enabled in
mod_clusterby default, but this can be disabled or its behavior can be changed through the configuration properties.
- Enabling advertising (multicast).
mod_clustercan 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_clusterdomain. The obvious ones that impact the web application contexts are enabling and disabling all contexts. The other options are used to reset the
mod_clusterdomain 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
Figure 32.7. Running Web Application Context Operations