Technical data

ServerIron ADX Advanced Server Load Balancing Guide 71
53-1002435-03
Content-aware cache switching
2
1. Because the URL begins with "gif", the CSW policy directs the request to one of the cache
servers in Server Group ID=1.
2. The ServerIron ADX hashes the URL string, selecting the same server it selected previously.
3. This time the cache server has the content and does not have to go to the Internet to get it; it
sends the cached content to the requesting client.
Setting up content-aware cache switching consists of the following steps.
1. Enabling TCS on the ServerIron ADX
2. Setting up CSW policies
3. Configuring the cache servers
4. Assigning the cache servers to a cache group
Enabling TCS
To enable TCS on all interfaces (globally) of the ServerIron ADX shown in Figure 19, enter the
following command.
ServerIronADX(config)# ip policy 1 cache tcp 80 global
Syntax: ip policy <index> cache | normal | high tcp | udp <tcp/udp-portnum> global | local
Setting up the CSW policies
The CSW policies define selection criteria for URL strings and specify what happens when a URL
string matches the selection criteria. In content-aware cache switching, if an HTTP request contains
a URL string that matches a policy’s selection criteria, the HTTP request can be sent to a load
balanced cache server group or to another policy for additional matching.
NOTE
The CSW policies discussed in this section apply to the example in Figure 19 on page 70.
The following commands define a CSW policy called “p1”.
ServerIronADX(config)# csw-rule r1 url suffix “gif”
ServerIronADX(config)# csw-policy p1
ServerIronADX(config-csw-p1)# match r1 forward 1
ServerIronADX(config-csw-p1)# default forward 2
ServerIronADX(config-csw-p1)# exit
Syntax: csw-rule r1 url prefix | suffix | pattern"<selection-criteria>"
The csw-rule r1 url suffix gif command consists of two parts. The first part specifies what kind of
matching the policy does on the selection criteria. Three kinds of matching methods are supported:
The prefix keyword compares the selection criteria to the beginning of the URL string.
The suffix keyword compares the selection criteria to the end of the URL string.
The pattern keyword looks for the selection criteria anywhere within the URL string.
The second part of the specifies the selection criteria, which can be up to 80 characters in length;
In this example, the selection criteria is the text string "gif". Because the matching method is suffix,
the policy looks at the end of the URL string. If the URL string ends with the text "gif", then the URL
string meets the selection criteria.