Skip to main content

Setting up collocated WebSphere Application Server load balancers and content hosts

Vijaykumar Palat (vpalat@us.ibm.com)IBM Software Services for WebSphere for IBM
Vijaykumar Palat is a Consulting IT Specialist for IBM as a member of IBM Software Services WebSphere for IBM, servicing the IBM Global Account. Jay has been a lead architect and developer for IBM internal projects, as well as for external clients and business partners, developing solutions for WebSphere Application Server and WebSphere Portal. He has an active interest in Web 2.0 technolgies, open source, and virtualization. He has a Masters of Information Technology from Carnegie Mellon University and BS in CS from University of Pittsburgh.

Summary:  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.

Date:  09 Jun 2004
Level:  Introductory
Activity:  229 views

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..


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.

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

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

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 Consulting IT Specialist for IBM as a member of IBM Software Services WebSphere for IBM, servicing the IBM Global Account. Jay has been a lead architect and developer for IBM internal projects, as well as for external clients and business partners, developing solutions for WebSphere Application Server and WebSphere Portal. He has an active interest in Web 2.0 technolgies, open source, and virtualization. He has a Masters of Information Technology from Carnegie Mellon University and BS in CS from University of Pittsburgh.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=13476
ArticleTitle=Setting up collocated WebSphere Application Server load balancers and content hosts
publish-date=06092004
author1-email=vpalat@us.ibm.com
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers