Technical data

94 Brocade ServerIron ADX Advanced Server Load Balancing Guide
53-1003441-01
Cache persistence using URL hashing
2
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 system
will start the second step. The second step in the process is to adjust the starting place on the URL
string by moving it by the number of characters defined by a value specified in the offset-value. If
the pattern string is empty, the system will not search the pattern part, and use the beginning of
URL string as the start point of the third step.
The offset-value is used to define how many characters will be skipped after the start point that is
defined by the pattern string. Normally this value is 0 (zero) which places the start point at the
beginning of the host string. A negative value can be used to move the starting place to the left in
the host string. If the offset-value is greater than the length of the rest of the URL, the system will
abort the rest of the searching steps, and start the next search (if configured). If another search
isn’t configured, the default hashing method is used. If the value of the offset-value variable is
within the length of the rest of the URL string, the system will skip to the offset place, and start the
third step.
With this command, the third step is for the system to look to the end of the host string to define
the string used for hashing.
Parsing using the “pattern string” with a delimiter
The following example identifies a pattern string to perform hashing on with an offset of “0” and a
delimiter value of “.”.
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 delimiter “.”
Syntax: [no] hash-persist url search-url pattern-string offset offset-value delimiter delimiter-string
The contents of the pattern-string variable is the same as described in “Parsing using the “pattern
string” only”.