Technical data

Brocade ServerIron ADX Advanced Server Load Balancing Guide 93
53-1003441-01
Cache persistence using URL hashing
2
Examples for parsing on the entire URL
In the following example, the client tries to connect to youtube at the following URL.
http://www.example4.com/watch?v=bUfp24dwzOA&playnext=1&videos=XA7MyzKoQXQ&feature
=featured
Table 7 displays the contents of the strings used for hashing if the pattern-string variable is set to
“v=” and the offset value is set to “0” depending on the method used. The methods and
commands required are described as follows.
Parsing using the “pattern string” only
ServerIronADX(config)#csw-policy p1
ServerIronADX(config-csw-p1)#match r1 forward 1
ServerIronADX(config-csw-p1)#match r1 hash-persist url search-url “v=” offset 0
Parsing using the “pattern string” with a delimiter
ServerIronADX(config)#csw-policy p1
ServerIronADX(config-csw-p1)#match r1 forward 1
ServerIronADX(config-csw-p1)#match r1 hash-persist url search-url “v=” offset 0
delimiter “v=”
Parsing using the “pattern string” with a specified string length
ServerIronADX(config)#csw-policy p1
ServerIronADX(config-csw-p1)#match r1 forward 1
ServerIronADX(config-csw-p1)#match r1 hash-persist url search-url “v=” offset 0
length 16
Parsing the host string
Parsing the host string allows you to select a “pattern-string” within a URL to determine a starting
point for identifying a URL sting to perform hashing on. This pattern string is combined with a
configured offset value to identify a starting point. From this starting point in the URL, a string that
will be used for hashing is derived by a method that is specified by the options you select for the
hash-persist url search-host command. These options are described in the following.
Parsing using the “pattern string” only – With this option, the ServerIron ADX begins at the starting
point in the URL and includes all of the characters up-to the end of the host string to form the string
used for hashing.
Search host string by starting at a “pattern string” and ending at a delimiter – With this option, the
ServerIron ADX begins at the starting point in the URL and includes all of the characters up-to a
specified delimiter character in the host string to form the string used for hashing.
TABLE 7 Results for parsing the entire URL by method
Method String used for hashing
pattern string only bUfp24dwzOA&playnext=1&videos=XA7MyzKoQXQ&feature=featured
pattern string with a
delimiter of “&”
cbUfp24dwzOA
pattern string with a
length value of “16”
bUfp24dwzOA&play