Plan for Content Based Routing

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.

CBR is similar to Dispatcher in its component structure. CBR consists of the following functions:

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.

Load balancing requests for different types of content

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.

Dividing your site content for better response time

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.

Providing backup of web server content

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.

Multiple Caching Proxy processes to improve processor utilization

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.

Rules-based load balancing with CBR

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.

Load balancing across fully secure (SSL) connections

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.

In addition to other ibmproxy.conf file changes for CBR, another configuration statement must be added to the ibmproxy.conf SSL file for Caching Proxy to enable SSL encryption on the proxy-to-server side. The format must be as follows:
proxy uri_pattern url_pattern address
where:
  • uri_pattern is a pattern to match (for example: /secure/*)
  • url_pattern is a replacement URL (for example: https://clusterA/secure/*)
  • address is the cluster address (for example: clusterA)

Load balancing client-to-proxy in SSL and proxy-to-server in HTTP

CBR with Caching Proxy can also receive SSL transmission from the client and then decrypt the SSL request before proxying the request to an HTTP server. For CBR to support client-to-proxy in SSL and proxy-to-server in HTTP, there is an optional keyword, mapport, on the cbrcontrol server command. Use this keyword when you must indicate that the port on the server is different from the incoming port from the client. The following example adds a port that uses the mapport keyword. The client's port is 443 (SSL) and the server's port is 80 (HTTP):
 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.
Because CBR must be able to advise on an HTTP request for a server that is configured on port 443 (SSL), a special ssl2http advisor is provided. This advisor starts on port 443 (the incoming port from the client) and advises on the servers that are configured for that port. If there are two clusters that are configured and each cluster has port 443 and servers that are configured with a different mapport, then a single instance of the advisor can open the appropriate port accordingly. The following is an example of this configuration:
Executor
    Port:443
    		Server1 mapport 80
    		Server2 mapport 8080
    Port:443
    		Server3 mapport 80
    		Server4 mapport 8080
    Advisor ssl2http 443
Concept topic    

Terms and conditions for information centers | Feedback

Last updated: April 16, 2014 11:59 AM EDT
File name: ccfg_plancbr.html