Chapter 13. HTTP Clustering and Load Balancing
13.1.1. About High-Availability and Load Balancing Clusters
- Instances of the Application Server
- The web server, whether it is the internal JBoss Web server, Apache HTTPD, Microsoft IIS, Oracle iPlanet Web Server, or Apache Tomcat
- Stateful, stateless, and entity Enterprise JavaBeans (EJBs)
- JNDI services
- Single Sign On (SSO) Mechanisms
- Distributed cache
- HTTP sessions
- JMS services and Message-driven beans (MDBs)
13.1.2. Components Which Can Benefit from High Availability
Several instances of the Enterprise Application Server (running as a standalone server) or a server group's members (running as part of a managed domain) can be configured to be highly available. This means that if one instance or member is stopped or disappears from the cluster, its work load is moved to a peer. The work load can be managed in such a way to provide load-balancing functionality as well, so that servers or server groups with more or better resources can take on a larger portion of the work load, or additional capacity can be added during times of high load.
The web server itself can be clustered for HA, using one of several compatible load balancing mechanisms. The most flexible is
mod_cluster connector, which is tightly integrated with the JBoss Enterprise Application Platform's container. Other choices include Apache
mod_proxy connectors, or the ISAPI and NSAPI connectors.
Deployed applications can be made highly-available because of the Java Enterprise Edition 6 (Java EE 6) specification. Stateless or stateful session EJBs can be clustered so that if the node which is involved in the work disappears, another node can take over, and in the case of stateful session beans, preserve the state.
13.1.3. Overview of HTTP Connectors
Table 13.1. HTTP connector features and constraints
|Connector||Web server||Supported operating systems||Supported protocols||Adapts to deployment status||Supports sticky session|
|mod_cluster||JBoss Enterprise Web Server HTTPD||Red Hat Enterprise Linux, Microsoft Windows Server, Solaris||HTTP, HTTPS, AJP||Yes. Detects deployment and undeployment of applications and dynamically decides whether to direct client requests to a server based on whether the application is deployed on that server.||Yes|
|mod_jk||JBoss Enterprise Web Server HTTPD, Apache HTTPD||Red Hat Enterprise Linux, Microsoft Windows Server if using JBoss Enterprise Web Server, Solaris||AJP||No. Directs client requests to the container as long as the container is available, regardless of application status.||Yes|
|mod_proxy||JBoss Enterprise Web Server HTTPD, Apache HTTPD||Red Hat Enterprise Linux, Microsoft Windows Server if using JBoss Enterprise Web Server, Solaris||HTTP, HTTPS||No. Directs client requests to the container as long as the container is available, regardless of application status.||Yes|
|ISAPI||Microsoft IIS||Microsoft Windows Server||AJP||No. Directs client requests to the container as long as the container is available, regardless of application status.||Yes|
|NSAPI||Sun Java System Web Server||Oracle Solaris||AJP||Yes|
Learn more about each HTTP Connector
13.1.4. Worker Node
A worker node, sometimes referred to as simply a node, is a JBoss Enterprise Application Platform server which accepts requests from one or more client-facing HTTPD servers. The JBoss Enterprise Application Platform can accept requests from its own HTTPD, the HTTPD shipped with JBoss Enterprise Web Server, Apache HTTPD, Microsoft IIS, or Oracle iPlanet Web Server (Formerly Netscape Web Server).
A cluster node is a member of a cluster of servers. Such a cluster may be load-balancing, high-availability, or both. In a load-balancing cluster, a central manager distributes work loads amongst its nodes equally, by some situation-specific measurement of equality. In a high-availability cluster, some nodes are actively doing work, and others are waiting to step in if one of the active nodes leaves the cluster.