Appendix D. Sample of a 2-tier high availability configuration using Dispatcher,
CBR, and Caching Proxy
This appendix describes how to set up a 2-tier, high availability configuration
combining the capabilities of two Load Balancer components (the Dispatcher component
and the CBR component) along with Caching Proxy.
Server machine set up
The server machine set up for Figure 43 is the following:
- EdgeServer1: primary (high availability) Dispatcher machine collocated
with CBR and Caching Proxy that load balances across Web servers
- EdgeServer2: standby (high availability) Dispatcher machine collocated
with CBR and Caching Proxy
- EdgeServer3: CBR and Caching Proxy machine
- WebServerA, WebServerB, WebServerC: backend Web servers
Figure 43 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 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. This will enable the EdgeServers to cache
Web pages that are requested more frequently. For more information on 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 wish to define for
the cluster. For more information to configure CBR, see Configuring Content Based Routing.
- 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 on
how to configure Dispatcher, see Configuring Dispatcher.
- Configure EdgeServer1 as the primary high availability machine and EdgeServer2
as the standby (backup) high availability machine. For more information,
see High availability.
Note:
- To avoid backend server addresses displayed in the URL on a client,
you will need to 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 notes 1-2 (above):
Caching ON
CacheMemory 128000 K
ReversePass /* http://websrvA.company.com/* http://www.company.com/*
- Remember to 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 may need to
install a patch to the Linux kernel or use an alternative to aliasing the
loopback device. For more information, see Linux loopback aliasing alternatives when using
Load Balancer's mac forwarding.
- For CBR, port affinity (stickytime) must not be used when using content
rules, otherwise the content rules will 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 setting up an Edge Components configuration as shown in Figure 43. 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
- Web site cluster address: 192.168.1.11
- WebServersA-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