Set up a 2-tier, high availability configuration that combines
the capabilities of two Load Balancer components (the Dispatcher component
and the CBR component) along with Caching Proxy.
Server setup
Example of a 2-tier,
high availability configuration that uses Dispatcher, CBR, and Caching
Proxy
This figure describes the following scenario:
- EdgeServer1: primary (high availability) Dispatcher machine that
is collocated with CBR and Caching Proxy that load balances across
web servers
- EdgeServer2: standby (high availability) Dispatcher machine that
is collocated with CBR and Caching Proxy
- EdgeServer3: CBR and Caching Proxy server
- WebServerA, WebServerB, WebServerC: backend web servers
The figure shows a basic representation of multiple servers (EdgeServer1,
EdgeServer2, EdgeServer3) load balancing across multiple backend web
servers. The CBR component uses Caching Proxy to forward requests
that are based on the content of the URL to the backend web servers.
The Dispatcher component is used to load balance the CBR components
across the EdgeServers. The high availability feature of the Dispatcher
component is used to ensure that requests to the backend servers continue
even if the primary high availability machine (EdgeServer1) fails
at any time.
Basic configuration guidelines
- Configure Caching Proxy to be the same on all the EdgeServers.
To improve the overall accessibility to the web pages on the backend
servers, set up Caching Proxy to do memory caching. Setting up Caching
Proxy enables the EdgeServers to cache web pages that are requested
more frequently. For more information about setting up Caching Proxy,
refer to the Caching Proxy Administration Guide.
- Define the cluster address and ports to be the same in both the
CBR and Dispatcher components of Load Balancer.
- Configure the CBR component to be the same across all EdgeServers.
Use web servers A, B, and C as your servers on the ports you want
to define for the cluster. For more information to configure CBR,
read the Configuring Content Based Routing topics.
- Configure the Dispatcher component to be the same on EdgeServer1
and EdgeServer2. Define all the EdgeServers as your servers on the
ports you want to be defined on the cluster to be load balanced by
Dispatcher. For more information about how to configure Dispatcher,
read the Configuring Dispatcher topics.
- Configure EdgeServer1 as the primary high availability machine
and EdgeServer2 as the standby (backup) high availability machine.
For more information, read the High Availability topic.
- To avoid backend server addresses displayed in the URL
on a client, set the ReversePass directive for each
backend server address in the Caching Proxy configuration file.
- To ensure that web memory caching is being used effectively, set
the Caching directive to ON and
increase the CacheMemory directive to the size required
in the Caching Proxy configuration file.
- Sample lines referred to in steps 1-2:
Caching ON
CacheMemory 128000 K
ReversePass /* http://websrvA.company.com/* http://www.company.com/*
- Alias the cluster address on the network interface card for EdgeServer1
and to alias the cluster address on the loopback device on the remaining
EdgeServers.
- If using the Linux platform for the EdgeServers,
you might install a patch to the Linux kernel
or use an alternative to aliasing the loopback device. .
- For CBR, do not use port affinity (stickytime) when you use content
rules because the content rules do not fire while processing requests
to the backend web servers.
Sample configuration files
The following
sample configuration files are similar to files that are created when
you set up an Edge Components configuration as shown in the figure.
The sample configuration files represent the files for the Dispatcher
and CBR components of Load Balancer. In the sample configuration,
a single Ethernet adapter is used for each of the EdgeServer machines
and all addresses are represented within a private subnet. The sample
configuration files use the following IP addresses for the specified
machines:
- EdgeServer1 (Primary high availability EdgeServer): 192.168.1.10
- EdgeServer2 (Backup high availability EdgeServer): 192.168.1.20
- EdgeServer3 (web caching EdgeServer): 192.168.1.30
- Website cluster address: 192.168.1.11
- WebServers A-C (Backend web servers): 192.168.1.71, 192.168.1.72,
and 192.168.1.73
Sample configuration file for Dispatcher component
on primary high availability EdgeServer
dscontrol executor start
dscontrol cluster add 192.168.1.11 primaryhost 192.168.1.10
dscontrol port add 192.168.1.11@80
dscontrol server add 192.168.1.11@80@edgeserver1 address 192.168.1.10
dscontrol server add 192.168.1.11@80@edgeserver2 address 192.168.1.20
dscontrol server add 192.168.1.11@80@edgeserver3 address 192.168.1.30
dscontrol manager start manager.log 10004
dscontrol highavailability heartbeat add 192.168.1.10 192.168.1.20
dscontrol highavailability backup add primary auto 4567
Sample configuration file
for CBR component on the EdgeServers
cbrcontrol set loglevel 1
cbrcontrol executor start
cbrcontrol cluster add 192.168.1.11
cbrcontrol port add 192.168.1.11@80
cbrcontrol server add 192.168.1.11@80@webserverA address 192.168.1.71
cbrcontrol server add 192.168.1.11@80@webserverB address 192.168.1.72
cbrcontrol server add 192.168.1.11@80@webserverC address 192.168.1.73
cbrcontrol rule add 192.168.1.11@80@webA_rule type content
pattern (URI=*WSA*)|(URI=*wsA*) priority 21
cbrcontrol rule useserver 192.168.1.11@80@webA_rule webserverA
cbrcontrol rule add 192.168.1.11@80@webB_rule type content
pattern (URI=/WS_B*) priority 22
cbrcontrol rule useserver 192.168.1.11@80@webB_rule webserverB
cbrcontrol rule add 192.168.1.11@80@webC_rule type content
pattern URI=*webC* priority 23
cbrcontrol rule useserver 192.168.1.21@80@webC_rule webserverC