Chapter 3. Reference Architecture Environment

3.1. Overview

This reference architecture consists of two JBoss EAP 7 clusters, each containing three nodes. The two clusters provide active/passive redundancy in an effort to approach a zero-downtime architecture. Having two distinct and separate clusters allows for upgrades and other types of maintenance, without requiring an operational maintenance window.

While it is also possible to use JBoss EAP itself as a front-end load balancer, this paper opts for the more common configuration of Apache HTTP Server. Two instances of Red Hat JBoss Core Services Apache HTTP Server 2.4 are deployed, each to front-end one of the EAP clusters for incoming HTTP requests.

A single instance of PostgreSQL database is used for JPA persistence in the back-end.

At any given time, the active setup simply includes an HTTP server that redirects to a logical JBoss EAP 7 application server for all functionality, which in turn uses the PostgreSQL database instance for its persistence.

3.2. Red Hat JBoss Core Services Apache HTTP Server 2.4

Two instances of Red Hat JBoss Core Services Apache HTTP Server are installed on a separate machine to front-end the active and passive EAP clusters, providing sticky-session load balancing and failover. The HTTP servers use mod_cluster and Apache JServ Protocol (AJP) to forward HTTP requests to an appropriate JBoss EAP node. The advertise feature of mod_cluster is turned off and the proxy’s host and port are configured on the mod_cluster plugin of the application servers, so that servers can directly contact and update the proxy.

Where requests over HTTP are concerned, the one instance of HTTP Server front-ending an EAP cluster can be considered a single point of failure. The HTTP Server itself can also be clustered but the focus is the enterprise application platform and clustering of the HTTP Server is beyond the scope of this reference architecture.

3.3. Red Hat JBoss Enterprise Application Platform

Two JBoss EAP 7 clusters are deployed and configured with nearly identical settings to provide active/passive redundancy. The clusters are front-ended by different HTTP Servers and as such, use a different URL in their mod_cluster proxy-list configuration.

In an effort to strike a balance in proposing an economical solution, while still providing high availability, each of the three nodes of the passive domain is co-located with a node of the active domain on the same machine. In a basic non-virtualized environment, this allows whichever cluster is active at any given time to take full advantage of the available hardware resources. The trade off is that certain maintenance tasks may affect both clusters and require downtime.

Alternatively, having two virtual machines on each physical server, one to host the active domain node and another for the passive domain node, allows certain OS-level maintenance work to be performed independently for each cluster. With such a setup, the efficiency loss from a resource usage perspective is insignificant. In this virtualized environment, certain maintenance tasks may require the shutdown of the host OS, which would still impact both clusters. To tilt yet further towards reliability at the expense of cost-efficiency, a distinct physical machine may be used for each node of each cluster, resulting in the use of 6 physical servers for the JBoss EAP 7 instances in this architecture.

3.4. PostgreSQL Database

To configure and demonstrate the functionality of JPA second-level caching in an EAP 7 cluster, an external database instance must be installed and configured. JPA is largely portable across various RDBMS vendors and switching to a different database server can easily be accomplished with minor configuration changes. This reference architecture uses PostgreSQL Database Server. JBoss EAP 7 uses hibernate for its JPA implementation, which has the ability to create the necessary schema, so the only required configuration on the database is the creation of a database as well as a user with privileges to create tables and modify data in that database. A single PostgreSQL database instance can serve both the active and passive EAP 7 clusters.

For client requests that result in JPA calls, the one instance of PostgreSQL Database can be considered a single point of failure. The Database itself can also be clustered, but the focus of this effort is JBoss EAP 7 and clustering of the Database is beyond the scope of this reference architecture.

The following diagram attempts to provide a simplified architectural diagram of this reference environment:

Figure 3.1. Reference Architecture - Single Cluster

Reference Architecture - Single Cluster

Message replication, as portrayed in this diagram, is particularly simplified. This reference architecture using a shared store to create an HA cluster for messaging. Each node has a live and a backup server, where each backup server shares a store with the live server of another node. The final result is an HA cluster with full failover and load balancing capability, as per the above diagram.