Technical data

72 ServerIron ADX Advanced Server Load Balancing Guide
53-1002435-03
Content-aware cache switching
2
NOTE
In addition to using text as selection criteria, you can use an asterisk (*) as a wildcard character to
specify one or more characters at the end of a URL string. For example, using "/ho*" as the selection
criteria matches /home, /hotels, and /home/main/index.html.
If you are using the suffix matching method, you cannot use an asterisk (*) as a wildcard character.
The asterisk wildcard character is valid for the prefix and pattern matching methods only.
Syntax: csw-policy <policy-name>
The csw-policy p1 command sets the name of the policy.
Syntax: match r1 forward <server-group-id>
If the URL string meets the selection criteria, the second part of the match command specifies
what to do with the HTTP request. In this example, the 1 in the command causes the HTTP request
to be sent to the cache server group whose ID = 1. Specifying 0 in the match command causes the
request to be directed to the Internet. A CSW policy can contain multiple match commands, each
with different selection criteria.
Syntax: default forward<server-group-id>
The default forward 2 command specifies what happens when the URL string does not meet any of
the selection criteria in a CSW policy’s match command. With a match command, you can specify a
server group ID number. In this example, if a URL string does not match the selection criteria in
policy p1, it is sent to Server Group 2 for evaluation.
NOTE
As the diagram in Figure 19 illustrates, there is only one cache server in Server Group ID = 2. Even
so, the match command must refer to a server group rather than an actual cache server. Server
groups can consist of one or more cache servers.
NOTE
By default, if no cache server is found in the server group then the request is bypassed to the
Internet. To override this behavior, you need to enable 'group-failover' under the cache-group. Refer
to the section '“Configuring group-failover” on page 73 for further details.
Configuring the cache servers
The cache servers return the content to the requesting clients. When configuring content-aware
cache switching, you place the cache servers into logical server groups. CSW policies direct HTTP
requests to one of the cache servers in these logical groups.
A server group can contain one or more cache servers. When a server group consists of more than
one cache server, the ServerIron ADX uses a hashing algorithm to select one of the cache servers,
and directs the request to the selected cache server. When configuring content-aware cache
switching, you establish the IP address of each cache server and specify the server group to which
it belongs.
To configure CacheServer1 in Figure 19 on page 70, enter commands such as the following
ServerIronADX(config)# server cache-name CacheServer1 192.168.1.101
ServerIronADX(config-rs-CacheServer1)# port http group-id 1 1
ServerIronADX(config-rs-CacheServer1)# exit
Syntax: port http group-id <server-group-id-pairs>