Technical data

84 ServerIron ADX Advanced Server Load Balancing Guide
53-1002435-03
Cache persistence using URL hashing
2
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.
Search host string by starting at a “pattern string” and continuing for a specified length – With this
option, the ServerIron ADX begins at the starting point in the URL and includes the number of
characters specified to form the string used for hashing.
Parsing using the “pattern string” only
The following example identifies a pattern string to perform hashing on with an offset of “0”.
NOTE
Because hash-persist action is a secondary action, you must add a forward action as shown in the
following example, before adding a hash-persist action.
ServerIronADX(config)# csw-policy p1
ServerIronADX(config-csw-p1)# match r1 forward 1
ServerIronADX(config-csw-p1)# match r1 hash-persist url search-host “www.” offset
0
Syntax: [no] hash-persist url search-url <pattern-string> offset <offset-value>
The contents of the <pattern-string> variable string are used with this command to define the
starting place in the hash string portion of the URL string. If the url string has multiple such pattern
strings, only the first one will be used. If the pattern string is not found, the system will abort the
rest of searching steps, and choose the default hashing method. If the pattern string is found, the
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