Clustering for scalability and failover

Clustering is an effective way to perform vertical and horizontal scaling of application servers.

Vertical scaling

In vertical scaling, shown in Figure 6-4, multiple cluster members for an application server are defined on the same physical machine, or node, which might allow the machine's processing power to be more efficiently allocated.

Even if a single JVM can fully utilize the processing power of the machine, you might still want to have more than one cluster member on the machine for other reasons, such as using vertical clustering for process availability. If a JVM reaches a table/memory limit (or if there is some similar problem), then the presence of another process provides for failover.

Figure 6-4 Vertical scaling

IBM recommends that you avoid using rules of thumb when determining the number of cluster members for a given machine. The only way to determine what is correct for your environment and application is to tune a single instance of an application server for throughput and performance, then add it to a cluster, and incrementally add additional cluster members. Test performance and throughput as each member is added to the cluster. Always monitor memory usage when you are configuring a vertical scaling topology and do not exceed the available physical memory on a machine.

In general, 85% (or more) utilization of the CPU on a large server shows that there is little, if any, performance benefit to be realized from adding additional cluster members. In conjunction with 6.2.1, Distributing workloads, you should ensure that the required business capacity is maintained even in failure scenarios. For example, in the basic three node cluster (the so-called rule of three, which maintains system redundancy even while a single node is offline) this would mean that no node exceeds 66% utilization at peak load, so that with the loss of one node, the surviving two nodes will not be overwhelmed.

Horizontal scaling

In horizontal scaling, shown in Figure 6-5, cluster members are created on multiple physical machines (or LPARs). This allows a single WebSphere application to run on several machines while still presenting a single system image, making the most effective use of the resources of a distributed computing environment. Horizontal scaling is especially effective in environments that contain many smaller, less powerful machines. Client requests that overwhelm a single machine can be distributed over several machines in the system.

Failover is another important benefit of horizontal scaling. If a machine becomes unavailable, its workload can be routed to other machines containing cluster members.

Figure 6-5 Horizontal scaling

Horizontal scaling can handle application server process failures and hardware failures (or maintenance) without significant interruption to client service.

Combining vertical and horizontal scaling

WebSphere applications can combine horizontal and vertical scaling to reap the benefits of both scaling techniques, as shown in Figure 6-6.

Figure 6-6 Vertical and horizontal scaling

Secure application cluster members

The workload management service has its own built-in security, which works with the WebSphere Application Server security service to protect cluster member resources. If security is needed for your production environment, enable security before you create a cluster for the application server. This enables security for all of the members in that cluster.

The EJB method permissions, Web resource security constraints, and security roles defined in an enterprise application are used to protect EJBs and servlets in the application server cluster. Refer to IBM WebSphere Application Server V6.1 Security Handbook, SG24-6316, for more information.
xxxx