Quick start configuration

This quick start example shows how to configure three locally attached workstations using the Dispatcher component's mac forwarding method to load-balance Web traffic between two Web servers. The configuration would be essentially the same for balancing any other TCP or stateless UDP application traffic.

Figure 8. A simple local Dispatcher configuration
A graphic showing a Client, Internet cloud, a Load Balancer machine, and two locally attached servers with addresses identified.

The mac forwarding method is the default forwarding method whereby Dispatcher load balances incoming requests to the server, and the server returns the response directly to the client. For more information on Dispatcher's MAC forwarding method, see Dispatcher's MAC-level routing (mac forwarding method).

Note:
You can complete the configuration using only two workstations with Dispatcher located on one of the Web server workstations. This setup represents a collocated configuration. Procedures for setting up more complex configurations can be found at Setting up the Dispatcher machine.

What do you need?

For the quick start example, you need three workstations and four IP addresses. One workstation is the Dispatcher machine; the other two workstations are the Web servers. Each Web server requires one IP address. The Dispatcher workstation requires two addresses: the nonforwarding address (NFA), and the cluster address (the address which is load balanced) that you provide to clients to access your Web site.

Note:
The NFA is the address that is returned by the hostname command. This address is used for administrative purposes, such as remote configuration.

How do you prepare?

  1. For this locally attached configuration example, set up your workstations on the same LAN segment. Ensure that network traffic between the three machines does not have to pass through any routers or bridges. (For setting up configurations with remote servers, see Configure wide area Dispatcher support.)
  2. Configure the network adapters of the three workstations. For this example, we will assume you have the following network configuration:
    Workstation Name IP Address
    1 server1.Intersplashx.com 9.47.47.101
    2 server2.Intersplashx.com 9.47.47.102
    3 server3.Intersplashx.com 9.47.47.103
    Netmask = 255.255.255.0
    Each of the workstations contains only one standard Ethernet network interface card.
  3. Ensure that server1.Intersplashx.com can ping both server2.Intersplashx.com and server3.Intersplashx.com.
  4. Ensure that server2.Intersplashx.com and server3.Intersplashx.com can ping server1.Intersplashx.com.
  5. Ensure that content is identical on the two Web servers (Server 2 and Server 3). This can be done by replicating data on both workstations, by using a shared file system such as NFS, AFS®, or DFS, or by any other means appropriate for your site.
  6. Ensure that Web servers on server2.Intersplashx.com and server3.Intersplashx.com are operational. Use a Web browser to request pages directly from http://server2.Intersplashx.com and http://server3.Intersplashx.com.
  7. Obtain another valid IP address for this LAN segment. This is the address you will provide to clients who wish to access your site. For this example we will use:
    Name= www.Intersplashx.com
    IP=9.47.47.104  
  8. Configure the two Web server workstations to accept traffic for www.Intersplashx.com.

    Add an alias for www.Intersplashx.com to the loopback interface on server2.Intersplashx.com and server3.Intersplashx.com.

  9. Delete any extra route that may have been created as a result of aliasing the loopback interface. See Step 2. Check for an extra route.

    You have now completed all configuration steps that are required on the two Web server workstations.

Configuring the Dispatcher component

With Dispatcher, you can create a configuration by using the command line, the configuration wizard, or the graphical user interface (GUI).

Note:
The parameter values must be typed in English characters. The only exceptions are parameter values for host names and file names.

Configuring with the command line

If you are using the command line, follow these steps:

  1. Start the dsserver on Dispatcher:

  2. Start the executor function of Dispatcher:

    dscontrol executor start

  3. Add the cluster address to the Dispatcher configuration:

    dscontrol cluster add www.Intersplashx.com

  4. Add the HTTP protocol port to the Dispatcher configuration:

    dscontrol port add www.Intersplashx.com:80

  5. Add each of the Web servers to the Dispatcher configuration:

    dscontrol server add www.Intersplashx.com:80:server2.Intersplashx.com

    dscontrol server add www.Intersplashx.com:80:server3.Intersplashx.com

  6. Configure the workstation to accept traffic for the cluster address:

    dscontrol executor configure www.Intersplashx.com

  7. Start the manager function of Dispatcher:

    dscontrol manager start

    Dispatcher will now do load balancing based on server performance.

  8. Start the advisor function of Dispatcher:

    dscontrol advisor start http 80

    Dispatcher will now make sure that client requests are not sent to a failed Web server.

Your basic configuration with locally attached servers is now complete.

Testing your configuration

Test to see if the configuration is working:

  1. From a Web browser, go to location http://www.Intersplashx.com. If a page is displayed, the configuration is working.
  2. Reload the page in the Web browser.
  3. Look at the results of the following command: dscontrol server report www.Intersplashx.com:80:. The total connections column of the two servers should add up to "2."

Configuring with the graphical user interface (GUI)

For information about using the Dispatcher GUI, see GUI and Appendix A. GUI: General instructions.

Configuration Wizard

For information about using the configuration wizard, see Configuring with the configuration wizard.

Types of cluster, port, server configurations

There are many ways that you can configure Load Balancer to support your site. If you have only one host name for your site to which all of your customers will connect, you can define a single cluster of servers. For each of these servers, configure a port through which Load Balancer communicates. See Figure 9.

Figure 9. Example of Dispatcher configured with a single cluster and 2 ports
Simple configuration

In this example for the Dispatcher component, one cluster is defined at www.productworks.com. This cluster has two ports: port 80 for HTTP and port 443 for SSL. A client making a request to http://www.productworks.com (port 80) goes to a different server than a client requesting https://www.productworks.com (port 443).

Another way of configuring Load Balancer might be appropriate if you have a very large site with many servers dedicated to each protocol supported. In this case, you might want to define a cluster for each protocol with a single port but with many servers, as shown in Figure 10.

Figure 10. Example of Dispatcher configured with two clusters, each with one port
Configuration with two clusters, each with single port

In this example for the Dispatcher component, two clusters are defined: www.productworks.com for port 80 (HTTP) and www.testworks.com for port 443 (SSL).

A third way of configuring Load Balancer might be necessary if your site does content hosting for several companies or departments, each one coming into your site with a different URL. In this case, you might want to define a cluster for each company or department and then define any ports to which you want to receive connections at that URL, as shown in Figure 11.

Figure 11. Example of Dispatcher configured with 2 clusters, each with 2 ports
Configuration with double clusters, each with double ports

In this example for the Dispatcher component, two clusters are defined with port 80 for HTTP and port 23 for Telnet for each of the sites at www.productworks.com and www.testworks.com.