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

Figure 43. Example of a 2-tier, high availability configuration using Dispatcher, CBR, and Caching Proxy
High availability configuration using Dispatcher, CBR, and Caching Proxy

The server machine set up for Figure 43 is the following:

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:

Note:
  1. 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.
  2. 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.
  3. Sample lines referred to in notes 1-2 (above):
    Caching              ON
    CacheMemory          128000 K
    ReversePass /* http://websrvA.company.com/* http://www.company.com/*
  4. 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.
  5. 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.
  6. 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:

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