This topic describes what the network planner might consider when installing and configuring the CBR component with Caching Proxy.
The CBR component load balances HTTP and SSL traffic with Caching Proxy to proxy the request. With CBR, you can load balance servers that you configure from your CBR configuration file with cbrcontrol commands.
The three key functions of CBR, executor, manager, and advisors, interact to balance and dispatch the incoming requests between servers. Along with load balancing requests, the executor monitors the number of new connections and active connections and supplies this information to the manager.
The CBR component gives you the ability to specify a set of servers that handle a request that is based on regular expression matching the content of the client request. You can use CBR to partition your site so that different content or application services can be served by different sets of servers. This partitioning is not apparent to clients that access your site.
One way to divide your site is by assigning some servers to handle only CGI requests, and assigning another set of servers to handle all other requests. Dividing your site stops compute intensive CGI scripts from slowing down the servers for normal HTML traffic, allowing clients to get better overall response time. Using this scheme, you might also assign more powerful workstations for normal requests. This assignment gives clients better response time without the expense of upgrading all your servers. You might also assign more powerful workstations for CGI requests.
Another possibility for partitioning your site might be to direct clients who are accessing pages that require registration to one set of servers, and all other requests to a second set of servers. Partitioning keeps casual browsers of your site from tying up resources that might be used by clients who are committed to your registration. You can also use more powerful workstations to service those clients who are registered.
You might also combine the previous methods for even more flexibility, and improved service.
Because CBR you can specify multiple servers for each type of request with CBR, you can load balance the requests for optimal client response. By allowing multiple servers to be assigned to each type of content, you are protected if one workstation or server fails. CBR recognizes the failure and continues to load balance client requests to the other servers in the set.
Caching Proxy communicates with a CBR process through its plug-in interface. CBR must be running on the local machine for this communication to work. Because there are two separate processes, multiple instances of the Caching Proxy can run and work with a single instance of CBR. This setup might be configured to segregate addresses or function between the Caching Proxies, or to improve the resource utilization of the machine by having several Caching Proxies handling client traffic. The proxy instances can be listening on different ports or binding to unique IP addresses on the same port, depending on what best suits the traffic requirements.
CBR, along with Caching Proxy, examines HTTP requests that use specified rule types. When Caching Proxy is running, it accepts client requests and queries the CBR component for the best server. Upon this query, CBR matches the request to a set of prioritized rules. When a rule is matched, an appropriate server is chosen from a preconfigured server set. Finally, CBR informs Caching Proxy which server was chosen and the request gets proxied there.
After you define a cluster to be load balanced, make sure that all requests to that cluster have a rule that will choose a server. If no rule is found that matches a particular request, the client receives an error page from Caching Proxy. The easiest way to ensure that all requests match some rule is to create an always true rule at a high priority number. Make sure that the servers that use this rule can handle all the requests that are not explicitly handled by the rules that have a lower-numbered priority. The lower-numbered priority rules are evaluated first.
Read the Configure rules to manage traffic to busy or unavailable servers topic to learn about rules-based load balancing.
CBR with Caching Proxy can receive SSL transmission from the client to the proxy (client-to-proxy side) and support transmission from the proxy to an SSL server (proxy-to-server side). By defining an SSL port on a server in the CBR configuration to receive the SSL request from the client, you can maintain a fully secure site that uses CBR to load balance across secure (SSL) servers.
proxy uri_pattern url_pattern address
where: cbrcontrol server add cluster@443 mapport 80
The
port number for mapport can be any positive integer
value. The default is the port number value of the incoming port from
the client.Executor
Port:443
Server1 mapport 80
Server2 mapport 8080
Port:443
Server3 mapport 80
Server4 mapport 8080
Advisor ssl2http 443