High availability with Load Balancer

The Dispatcher component offers a built-in high availability feature, eliminating Dispatcher as a single point of failure from your network. This feature involves the use of a second Dispatcher machine that monitors the main, or primary, machine and stands by to take over the task of load balancing should the primary machine fail at any time.

Functioning in conjunction with content hosts, such as WebSphere Application Server, the Load Balancer Dispatcher component enables you to enhance your network's availability and scalability. Load Balancer is used by enterprise networks and is installed between the Internet and the enterprise's back end servers, as shown in the following figure.

Load balancer installation between the internet and the back end serversLoad balancer installation between the internet and the back end servers

Load Balancer acts as the enterprise's single point-of-presence on the Internet, even if the enterprise uses multiple back end servers because of high demand or a large amount of content. Availability is achieved through load balancing multiple content hosts and failover support.

Load balancing multiple content hosts

You can satisfy high demand by duplicating content on multiple hosts, but then you need a way to balance the load among them. Domain Name Service (DNS) can provide basic round-robin load balancing, but there are several situations in which it does not perform well.

A more sophisticated solution for load balancing multiple content hosts is to use the Dispatcher component that is shown in the Load balancing multiple content hosts figure.

Load balancing multiple content hosts
Load balancing multiple content hosts
Legend:
  • 1 - Client
  • 2 - Internet
  • 3 - Router/Gateway
  • 4 - Dispatcher
  • 5 - Content host

In this configuration, all of the content hosts (the machines marked 5) store the same content. They are defined to form a load-balanced cluster, and one of the network interfaces of the Load Balancer machine (4) is assigned a host name and IP address dedicated to the cluster. When an end user working on one of the machines marked 1 requests file X, the request crosses the Internet (2) and enters the enterprise's internal network through its Internet gateway (3). The Dispatcher intercepts the request because its URL is mapped to the Dispatcher's host name and IP address. The Dispatcher determines which of the content hosts in the cluster is currently best able to service the request, and forwards the request to that host, which returns file X directly to the client (that is, file X does not pass through Load Balancer).

By default, the Dispatcher uses weighted round-robin load balancing, and it addresses many of DNS's inadequacies. Unlike DNS, it tracks whether a content host is unavailable or inaccessible and does not continue to direct clients to an unavailable content host. Further, it considers the current load on the content hosts by tracking new, active, and finished connections. You can further optimize load balancing by activating Load Balancer's optional advisor and manager components, which track a content host's status even more accurately and incorporate the additional information into the load-balancing decision process. The manager enables you to assign different weights to the different factors used in the decision process, further customizing load balancing for your site.

Failover support

Load Balancer acts as a single point-of-presence for your enterprise's content hosts. This is beneficial because you advertise the cluster host name and address in DNS, rather than the host name and address of each content host, which provides a level of protection against casual attacks and provides a unified feel for your enterprise's web site. To further enhance web site availability, configure another Load Balancer to act as a backup for the primary Load Balancer, as shown in the figure that follows. If one Load Balancer fails or becomes inaccessible due to a network failure, end users can still reach the content hosts.

Using a primary and backup Load Balancer to make Web content highly available
Using a primary and backup Load Balancer to make Web content highly available
Legend: 1--Client 2--Internet 3--Router/Gateway 4--Primary Dispatcher 5--Backup Dispatcher 6--Content host
Legend:
  • 1 - Client
  • 2 - Internet
  • 3 - Router/Gateway
  • 4 - Primary Dispatcher
  • 5 - Backup Dispatcher
  • 6 - Content host

In the normal case, a browser running on one of the machines marked 1 directs its request for a file X to the cluster host name that is mapped to the primary Load Balancer (4). The Dispatcher routes the request to the content host (6) selected on the basis of the Dispatcher's load-balancing criteria. The content host sends file X directly to the browser, routing it through the enterprise's gateway (3) across the Internet (2) but bypassing Load Balancer. The backup Dispatcher (5) does not perform load balancing as long as the primary one is operational. The primary and backup Dispatchers track each other's status by periodically exchanging messages called heartbeats. If the backup Dispatcher detects that the primary has failed, it automatically takes over the responsibility for load balancing by intercepting requests directed to the primary's cluster host name and IP address.