2.1 About clustering application servers

A cluster is a group of application server instances that run simultaneously, which act like a single system, enabling high availability and load balancing. Within a cluster, multiple server instances can run on the same computer (known as a vertical cluster) or can be located on different computers (known as a horizontal cluster), or they can form a combination of both horizontal and vertical clusters. With clustering, client work can be distributed across several nodes instead of handled by a single application server.

In a clustered configuration, application server instances are server members of the cluster, all of which must have identical application components deployed on them. However, other than the configured applications, cluster members do not have to share any other configuration parameters. For example, you can cluster multiple server instances on one computer, with a single instance on another computer, provided they are all running the same version of application server.

By clustering, you can achieve one or more of the following benefits. How you implement clustering determines which benefits are achieved:

  • Failover

  • Load balancing

  • Scalability

2.1.1 Failover

Failover allows one or more application server instances to act as backup to a failed application server instance and resume processing the task, therefore enabling another application server to carry on processing. However, if an application server fails during a transaction, the backup application server does not recover the state of the failed instance. If a server fails when a user enters data into a form, for example, the data may have to be reentered.

2.1.2 Load balancing

Load balancing is a technique used to distribute work across a number of systems so that no single device is overwhelmed. If one server starts to get congested or overloaded, requests are forwarded to another server that has more capacity.

2.1.2.1 Application server load balancing

Application server load balancing is useful for managing the load between application servers. Application servers can be configured to use a weighted round-robin routing policy that ensures a balanced routing distribution based on the set of server weights that are assigned to the members of a cluster. Configuring all servers in the cluster to have the same weight produces a load distribution in which all servers receive approximately the same number of requests. Weighting some servers more heavily sends more requests to these servers than to those that are weighted less heavily.

Preferred routing configurations can also be configured to ensure, for example, that only cluster members on that node are selected (using the round-robin weight method) and cluster members on remote nodes are selected only if a local server is not available. Application server load balancing is best used when balancing is needed between tiers.

2.1.2.2 Web server load balancing

Web server load balancing is useful for queuing and throttling requests. For the Apache HTTP Server, the most commonly used method for load balancing is Round-Robin DNS.

Round-Robin DNS is a relatively simple method of load balancing, where a domain name system (DNS) server provides a name to address resolution and is always involved when a host name is included in a URL. A Round-Robin DNS server can resolve one single host name into multiple IP addresses such that requests for a single URL (containing a host name) actually reference different web servers. The client requests a name resolution for the host name but, in fact, receives different IP addresses, therefore spreading the load among the web servers. In a simple configuration, the Round-Robin DNS server cycles through the list of available servers.

2.1.3 Scalability and availability

Scalability in a cluster means that an administrator can increase the capacity of the application dynamically to meet the demand without interrupting or negatively impacting service. Clusters allow administrators to remove nodes from a cluster in order to upgrade components, such as memory, or to add nodes to the cluster without bringing down the cluster itself.

// Ethnio survey code removed