Chapter 32. Clustering with JOnAS

This chapter describes how to configure Apache, Tomcat, and JOnAS to install a cluster.

This configuration uses the Apache/Tomcat plug-in mod_jk to provide load balancing and high availability at the JSP/Servlet level. The mod_jk plug-in enables the use of the Apache HTTP server in front of one or more Tomcat JSP/Servlet engines, and provides the capability of forwarding some of the HTTP requests (typically those concerning dynamic pages—such as JSP and Servlet requests) to Tomcat instances.

The configuration uses the In-Memory-Session-Replication technique based on the group communication protocol JavaGroups to provide failover at the Servlet/JSP level.

For load balancing at the EJB level, a clustered JNDI called CMI is used.

32.1. Cluster Architecture

The architecture with all the clustering functionality available in JOnAS is Apache as the front-end HTTP server, JOnAS/Tomcat as J2EE Container, and a shared database.

At the servlet/JSP level, the mod_jk plug-in provides load balancing/high availability, and the tomcat-replication module provides failover.

At the EJB level, the clustered JNDI CMI provides load balancing/high availability.

The database is shared by the JOnAS servers.

The architecture presented in this document is shown in the following illustration:

Figure 32-1. Architecture

This architecture provides:

However, failover at EJB level is not available. This means that no State Replication is provided. The mechanism to provide failover at EJB level is under development and will be available in a coming version of JOnAS.