Technical data
86 Brocade ServerIron ADX Advanced Server Load Balancing Guide
53-1003441-01
Content-aware cache switching
2
ServerIronADX(config)#ip policy 1 cache tcp 80 global
Setting up the CSW policies
To implement the configuration in Figure 22, you would create a CSW policy that sends all requests
containing URL strings ending with "asp" directly to the Internet, bypassing the cache servers. All
other requests are sent to one of the cache servers in Server Group ID = 100.
The following commands define a CSW policy called “policyA1”.
ServerIronADX(config)#csw-rule r1 url pattern “asp”
ServerIronADX(config)#csw-policy policyA1
ServerIronADX(config-csw-policyA1)#match r1 forward 0
ServerIronADX(config-csw-policyA1)#default forward 100
ServerIronADX(config-csw-policyA1)#exit
The pattern method in the csw-rule r1 url command causes the policy to look for the selection
criteria anywhere within the URL string.
The match r1 forward 0 command looks for URL strings that contain the text "asp"; for example,
/active/q.asp?ln=fdry. These HTTP requests are sent to the Internet.
The default forward 100 command sends HTTP requests that do not meet the selection criteria in
policyA1’s match command Server Group ID = 100.
Configuring the cache servers
To place the cache servers in Figure 22 on page 85 into server group ID = 100, enter the following
commands.
ServerIronADX(config)#server cache-name CacheServer1 192.168.1.101
ServerIronADX(config-rs-CacheServer1)#port http group-id 100 100
ServerIronADX(config-rs-CacheServer1)#exit
ServerIronADX(config)#server cache-name CacheServer5 192.168.1.102
ServerIronADX(config-rs-CacheServer5)#port http group-id 100 100
ServerIronADX(config-rs-CacheServer5)#exit
ServerIronADX(config)#server cache-name CacheServer6 192.168.1.103
ServerIronADX(config-rs-CacheServer6)#port http group-id 100 100
ServerIronADX(config-rs-CacheServer6)#exit
Assigning the cache servers to a cache group
To activate the configuration shown in Figure 22, enter the following commands.
ServerIronADX(config)#server cache-group 1
ServerIronADX(config-tc-1)#cache-name CacheServer1
ServerIronADX(config-tc-1)#cache-name CacheServer2
ServerIronADX(config-tc-1)#cache-name CacheServer3
ServerIronADX(config-tc-1)#http-cache-control
ServerIronADX(config-tc-1)#csw
ServerIronADX(config-tc-1)#csw-policy policyA1
Syntax: [no] http-cache-control
The http-cache-control command ensures that HTTP 1.0 requests that have a pragma:no-cache
header and HTTP 1.1 requests that have a Cache-Control header containing a no-cache directive
are sent to the Internet. This is the default behavior. To configure the ServerIron ADX to ignore the
pragma:no-cache or Cache-Control header in an HTTP request, use the no http-cache-control
command.










