Saturday, May 1, 2010

Load Balancer - Definition + Components + Configuration + Availability

What is Load Balancer ?

 

Load Balancer is component of the WebSphere Application Server Edge Components, formerly called Websphere Edge Server. The Edge Server also includes a Caching Proxy (Web Traffic Express).  

 

Load Balancer is an advanced load balancing server which addresses the limitations of Round Robin DNS servers. Round Robin DNS distributes requests across a group of similar servers. Each request is sent to the next server in the list without taking into account the load on the server, the complexity of the request or even if the server is available.

 

 

Components of Load Balancer :

 

The Load Balancer consists of three subcomponents:

 

  1. Dispatcher

Dispatcher provides an advanced IP level load-balancing mechanism, which you install instead of Round Robin DNS. It can provide load balancing for any TCP or UDP protocol. Once installed, Dispatcher remains completely invisible to clients but can deliver superior load balancing, management and availability function. Load Balancer's Dispatcher addresses these limitations by monitoring the status and response time of servers, assigning weights to each server and using an algorithm to return the right server to handle each request.

 

The right server is not always the best server, since it is desirable for all eligible servers to process their share of the load. Even the worst server needs to shoulder some of the burden. If traffic is only forwarded to the best server, it can be guaranteed that it will rapidly cease to be the best, and the load on the servers will swing backwards and forwards. Dispatcher's patented algorithm for choosing the right server and its advanced smoothing techniques achieve and maintain an optimal balance of server load distribution in the shortest possible time.

 

  1. Content Based Routing (CBR)

Content Based Routing (CBR) provides full-function load balancing based on information in the HTTP data stream such as URLs, paths, cookies and so forth, or in the POP3 and IMAP data streams. Content Based Routing (CBR) uses information in the request packet to determine the best server to handle the request. For HTTP packets the information could be the URL or cookie contents. CBR also supports POP3 and IMAP servers.

 

  1. Interactive Session Support (ISS)

Interactive Session Support (ISS) uses load monitoring of servers to provide an intelligent DNS server that can address the limitations of Round Robin DNS while still providing the standard DNS interface for clients. It provides a least disruptive migration path for applications that are already deployed using Round Robin DNS. ISS also provides an observer module to pass system load information to the Dispatcher. Interactive Session Support (ISS) runs an agent on each server to collect system information such as CPU utilization and number of processes. The agent is monitored by a monitoring daemon on the ISS server which can perform more intelligent load balancing. These three subcomponents can be deployed separately or together in various configurations to suit a wide variety of customer application requirements.

 

 

Load Balancer Configuration

 

Before installing the Load Balancer machine, you should setup a three-tier environment as previously described. The cluster host name should be used in the WebSphere Commerce configuration. Install and configure the additional Web server machines using the same process as the initial machine. Each Web server machine should have the cluster IP address as an alias of its network interface. The Web server configuration file should be edited to ensure that the cluster host name and IP address are used in the ServerName and VirtualHost directives.

 

Load Balancer could also be used in a two-tier configuration. Install Load Balancer (from the Edge Components CD in WebSphere Application Server Network Deployment) and configure the machine with the cluster IP address as an alias of its network interface. The local address of the Load Balancer machine is known as the non-forwarding address. Configure Load Balancer using its graphical user interface (or by editing its configuration file directly). Start the executor and add the cluster. Specify the cluster IP address, subnet mask and the network interface. Add server ports 80 (for HTTP) and 443 (for SSL), and if requests to the administration tools will also go through the Load Balancer, add ports 8000, 8002 or 8004.

 

To provide load monitoring of the Web servers, you could install and configure Interactive Session Support (ISS). ISS is usually only needed is special cases where the load on the different Web servers varies dramatically. This might be the case in a two-tier configuration where the Web server and Websphere Commerce Server run on the same machine and some command requests could take significantly longer than others. It is unlikely that ISS would be needed in a three-tier configuration because the Web servers only serve static content or forward requests to application servers. To set up ISS, the ISS server needs to be installed (either on the Load Balancer machine or a dedicated machine) and configured with the Dispatcher Observer. On each Web server machine the ISS agent is installed to monitor the system load and report it to the ISS server.

 

Affect on Overall availability

 

A three-tier configuration with multiple Web servers eliminates the single points of failure in the firewalls, Load Balancer, Web server, WebSphere Commerce server and database server. This is provided using a combination of failover and redundancy.

 

The database machine uses clustering software (such as HACMP on AIX) for failover. If the primary fails, the secondary takes over immediately. The data is stored on external shared disk (such as SSA disk arrays). Distribution over several disks, redundant power supplies and network adapters provide a very high degree of availability. The Websphere Commerce servers and Web servers use redundancy because there is no application data stored in the middle tier. The application will continue to be available if one or more servers fail, although at reduced capacity.

 

The Load Balancer uses a standby server for failover. Only the affinity tables get lost when there is a takeover. They are regenerated within a few seconds so it is transparent for the user of the browser. The firewall machines can also use clustering software for failover.