Skip to main content

skip to main content

developerWorks  >  WebSphere  >

Setting up collocated WebSphere Application Server load balancers and content hosts

developerWorks
Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community


Rate this page

Help us improve this content


Level: Introductory

Vijaykumar Palat (vpalat@us.ibm.com)IBM WebSphere Competency Center

09 Jun 2004

This article describes how to conserve processing resources by collocating WebSphere® Edge Server Load Balancers for WebSphere Application Server V5 on a local content host in a cluster of servers -- while the cluster is being load balanced.

Get the products and tools used in this article

If you are a developerWorks subscriber, you have a single user license to use WebSphere Application Server, WebSphere Application Server Network Deployment Edge Components for Windows®, and other DB2®, Lotus®, Rational®, Tivoli®, and WebSphere products -- including the Eclipse-based WebSphere Studio IDE -- to develop, test, evaluate, and demonstrate your applications. If you are not a subscriber, you can subscribe today.

Introduction

The WebSphere Edge Server Load Balancer (Network Dispatcher), part of the Edge Components for WebSphere Application Server V5, distributes incoming client requests across multiple servers, balancing the requests among the servers based on dynamically-generated weights or on content. The Load Balancer can be used to transparently cluster content servers, including HTTP servers, application servers, and proxy servers. Although the Dispatcher component of Load Balancer does not generally consume many processing or memory resources, you can conserve resources by running the Dispatcher on one of the machines in the cluster that it is currently load balancing, referred to as "collocating servers". Using a collocated server enables you to reduce the total cost of ownership by decreasing the number of physical machines required to set up a scalable enterprise architecture. This article outlines the setup steps required to successfully configure an enterprise architecture that uses a collocated server on a Windows 2000 system..



Back to top


Collocation in a server cluster

Load Balancer can reside on the same machine as a server for which it is load balancing requests; this collocation applies to the Dispatcher and Site Selector components of Load Balancer. Collocation of load balancers under Windows 2000 is only available when using the Network Address Translation (NAT) / Network Address Port Translation (NAPT) forwarding method. NAT forwarding is intended for use with remotely positioned servers and requires more setup information than is necessary for locally-hosted machines. NAT forwarding can suffer from some performance degradation compared to Media Access Control (MAC) forwarding.

Collocation is also supported for content based routing, but only when using bind-specific Web servers and a bind-specific caching proxy. No additional configuration for collocation is required if using content based routing


Figure 1. Locating a Load Balancer (Dispatcher) on a local content host
Figure 1. Locating a Load Balancer (Dispatcher) on a local content host

Figure 1 shows a sample configuration that collocates Load Balancer on a local content host. In general:

  1. All of the content hosts (Server1, Server2, Server3) store the same content.
  2. A single machine runs both Load Balancer and one of the content hosts (Server1).
  3. The content hosts are defined to form a load-balanced cluster, and one of the network interfaces of the Load Balancer machine is assigned a host name and IP address dedicated to the cluster.
  4. Using a client browser, a user requests a file, sending the request across the Internet and into the enterprise's internal network through its Internet gateway.
  5. The request is forwarded to the cluster host name that is mapped to the Load Balancer.
  6. The Load Balancer routes the request to the content host selected on the basis of the Dispatcher's load-balancing criteria.
  7. The content host sends the file to the Load Balancer, which routes it through the enterprise's gateway across the Internet and back to the client browser.

In this example:

  • A client will make a request for a page on the cluster address (192.168.204.13).
  • The request will travel over the internet, through the router to the Load Balancer.
  • Based on the configuration and load-balancing pattern of the Load Balancer, the request will be rewritten and passed to Server1 or Server 2 or Server 3.
  • In the case where the destination is Server 2, the destination of the packet will be 192.168.194.13, and the source will be 192.168.206.131, which is the return address of the Load Balancer.
  • When Server 2 has completed the request, it will return the response to the return address (192.168.206.131). Load Balancer will then redirect the response to the original client.



Back to top


Preparing the environment

We will assume that you have the necessary prerequisite software properly installed and that you also have obtained the necessary IP addresses for the configuration.

Prerequisite software to install:

  • Windows 2000 Professional, Windows 2000 Server, or Windows 2000 Advanced Server
  • WebSphere Application Server V5.x
  • WebSphere Edge Server Load Balancer 5.0
See the Load Balancer Administration Guide for requirements and installation instructions.

IP addresses to obtain:

  • Client Gateway (Router): The address of your network gateway.
  • Cluster Address: This address is the Fully Qualified Domain Name (FQDN) or IP address that will be advertised for your cluster. It is used by a client to connect to the servers in a cluster.
  • Load Balancer Nonforwarding address (NFA): The nonforwarding address for the Load Balancer. This is the address that the Load Balancer will refer to itself as. Typically, the NFA is used for high availability.
  • Load Balancer Return Address: After the request is completed on the server, it will return through the Load Balancer to the client. This address must be different from the NFA, the cluster address and the collocated server address.
  • WebSphere Application Server1, 2 ... n: The addresses of the WebSphere Application Servers between which the Load Balancer will be switching. The address for the server that is collocated with the Load Balancer should be separate from the NFA, the cluster server address, and the Return Address. The Address for the collocated content host should be configured using Windows Networking, not the dscontrol command.

Our example uses these IP addresses:

  • Client Gateway (Router): 192.168.193.1
  • Cluster Address: 192.168.204.13
  • Load Balancer NFA: 192.168.204.71
  • Load Balancer Return Address: 192.168.206.131
  • WebSphere Application Server1 (collocated server): 192.168.206.113
  • WebSphere Application Server2: 192.168.194.13
  • WebSphere Application Server3: 192.168.204.101



Back to top


Configuring the load balancer

The Load Balancer can be configured by using either a command line, scripts, the GUI, or a configuration wizard. This steps listed below use the command line method, and include syntax and examples for each command needed. (The dscontrol executor configure and disconfig commands are interchangeable.)

  1. Start the IBM Dispatcher Service from the Services Panel.

  2. Start the executor.
    Command: dscontrol executor start

  3. Define the client gateway. The client gateway is an IP address that is used as the router address through which traffic in the return direction is forwarded from the Load Balancer to clients.
    Syntax: dscontrol executor set clientgateway <CLIENT GATEWAY>
    Example:dscontrol executor set clientgateway 192.168.193.1

  4. Define the NFA.
    Syntax: dscontrol executor set nfa <NFA_ADDR>
    Example:dscontrol executor set nfa 192.168.204.71

  5. Configure the NFA to the network interface card (configure an alias using ethernet card 0).
    Syntax: dscontrol executor configure <NFA_ADDR> <INTERFACE_NAME> <NET_MASK>
    Example:dscontrol executor configure 192.168.204.71 en0 255.255.240.0

  6. Define the cluster address.
    Syntax: dscontrol cluster add <CLUSTER_ADDR>
    Example:dscontrol cluster add 192.168.204.13

  7. Configure the cluster address.
    Syntax: dscontrol executor configure <CLUSTER_ADDR> [<INTERFACE_NAME> <NET_MASK>]
    Example:dscontrol executor configure 192.168.204.13

  8. Define the port as a NAT port.
    Syntax: dscontrol port add <CLUSTER_ADDR>:<PORT> method nat
    Example:dscontrol port add 192.168.204.13:80 method nat

  9. Configure an alias return address on Load Balancer (using ethernet card 0).
    Syntax: dscontrol executor configure <RETURN_ADDR> <INTERFACE_NAME> <NET MASK>
    Example:dscontrol executor configure 192.168.206.131 en0 255.255.240.0

  10. Define remote servers. When remote servers reside on the same subnet, the router address is the same as the server address.
    Syntax: dscontrol server add <CLUSTER_ADDR>:<PORT>:<SERVER> router <SERVER> returnaddress <RETURN_ADDR>
    Example:dscontrol server add 192.168.204.13:80:192.168.194.13 router 192.168.194.13 returnaddress 192.168.206.131
    dscontrol server add 192.168.204.13:80:192.168.204.101 router 192.168.204.101 returnaddress 192.168.206.131

  11. Define local server. Important: The local server's IP alias should only be added by using Windows Networking. Do not use dscontrol executor configure to configure this address.
    Syntax: dscontrol server add <CLUSTER_ADDR>:<PORT>:<SERVER> router <CLIENT_GATEWAY> returnaddress <RETURN_ADDR>
    Example:dscontrol server add 192.168.204.13:80:192.168.206.113 router 192.168.193.1 returnaddress 192.168.206.131



Back to top


Conclusion

This article described the general use of the WebSphere Edge Component Load Balancer for WebSphere Application Server V5 and how its Dispatcher component can be collocated on a local content host in a cluster of servers being load balanced, enabling users to conserve processing or memory resources. The instructions provided will help in configuring a network system that uses a collocated server in a Windows 2000 environment.



Resources



About the author

Vijaykumar Palat is a software engineer in the IBM WebSphere Competency Center.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top