This quick start example shows how to configure three locally
attached workstations using Content Based Routing (CBR) along with
Caching Proxy, to load-balance web traffic between two web servers.
Before you begin
Attention: For simplicity, this example illustrates
servers on the same LAN segment; however; with CBR, there is no restriction
for using servers on the same LAN.
You need three workstations
and four IP addresses for this quickstart example. One workstation
is the CBR machine; the other two workstations are the web servers.
Each web server requires one IP address. The CBR workstation requires
one actual addresses and one address to be load balanced.
Simple
local CBR configuration
For more information
on the different ways Load Balancer can be setup, read the Types of
cluster, port, and server configurations for Content Based Routing
topic to help you design your topology.
Caching Proxy should
be installed on the same server to use CBR. To configure Caching Proxy
for CBR, read step one of the Setting up the Content Based Routing
component topic.
About this task
Use this configuration method for a quick way to establish
a connection between servers and the CBR machine. This method does
not include configuring advisors or tuning performance. For a full
configuration, read Configuring the Load Balancer machine and Configuring
the server machines topics.
Procedure
- Prepare your servers.
- For this 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.
- Configure the network adapters of the three workstations. For this example, we will assume you have the following network
configuration:
Table 1. Sample network configurationWorkstation |
Name |
IP Address |
1 |
server1.mywebsite.com |
9.27.27.101 |
2 |
server2.mywebsite.com |
9.27.27.102 |
3 |
server3.mywebsite.com |
9.47.47.103 |
Netmask = 255.255.255.0 |
Each of the workstations contains only one standard Ethernet
network interface card.
- Ensure that all the servers can communicate with each
other.
- Ensure that server1.mywebsite.com can ping both server2.mywebsite.com and server3.mywebsite.com.
- Ensure that server2.mywebsite.com and server3.mywebsite.com can
ping server1.mywebsite.com.
- Ensure that web servers on server2.mywebsite.com and server3.mywebsite.com are
operational. Use a web browser to request pages directly
from http://server2.mywebsite.com (for example, .../member/index.html)
and http://server3.mywebsite.com (for example, .../guest/index.html).
- Obtain another valid IP address for this LAN segment.
This is the cluster address you will provide to clients who wish to
access your site. For this example we will use:
Name= www.mywebsite.com
IP=9.27.27.104
- Configure CBR using the command line, the GUI, or the configuration
wizard.
With CBR, you can create a configuration by
using the command line, the configuration wizard, or the graphical
user interface (GUI). For this quick start example, configuration
steps are demonstrated using the command line.
Important: You
must enter the parameter values in English characters. The only exceptions
are parameter values for host names and file names.
- Test your configuration.
- From a web browser, enter http://www.mywebsite.com/member/
index.htm. If a page displays, the configuration is working.
- Reload the page in the web browser.
- Look at the results of the following command:
cbrcontrol server report www.mywebsite.com@80@
The
total connections column of the two servers should add up to 2.
What to do next
You can also configure CBR with the graphical user interface
(GUI) and the configuration wizard. Read the Methods of configuration
for Content Based Routing topic for more information.