Creating a csw rule to match the server response, Creating a csw rule to match the client request – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual
Page 293
![background image](/manuals/361724/293/background.png)
Brocade Virtual ADX Server Load Balancing Guide
277
53-1003247-01
Server passive cookie persistence
5
•
“Creating a CSW rule to match the client request”
•
“Specifying a CSW action to create persistence information”
•
“Specifying a CSW action to perform persistence lookup and retrieve real server information”
Creating a CSW rule to match the server response
To create a CSW rule to match the server response, use the following command.
Virtual ADX(config)#csw-rule r1 response-header “Set-Cookie” pattern “JSESSIONID”
Syntax: [no] csw-rule rule-name response-header header-name pattern search-string
The rule-name variable can be up to 80 characters in length.
The header-name variable specifies HTTP header field to be matched in an HTTP response from a
real server.
The search-string variable specifies the string within the header-name variable that will be
matched in the HTTP response from a real server.
Creating a CSW rule to match the client request
To create a CSW rule to match the client request, use the following command.
Virtual ADX(config)#csw-rule r2 header “Cookie” pattern “JSESSIONID”
Syntax: [no] csw-rule rule-name header header-name pattern search-string
The rule-name variable can be up to 80 characters in length.
The header-name variable specifies the HTTP header field to be matched in an HTTP request from
a client.
The search-string variable specifies the string within the header-name variable that will be
matched in an HTTP request from a client.
Specifying a CSW action to create persistence information
To specify a CSW action to maintain persistency information, use the following command.
Virtual ADX(config)#csw-policy p1
Virtual ADX(config-csw-policy-p1)#match r1 passive-persist offset 0 length 11
Syntax: [no] match rule-name passive-persist offset persistence-string-offset length
persistence-string-length
The rule-name variable is the name of a previously configured CSW rule that was defined to match
a server response.
The persistence-string-offset variable specifies the number of characters that will be skipped
directly after the search-string variable matched in the specified CSW rule. Normally this value is 0
(zero) which places the start point at the character that is right after the string. As an example, you
can configure a search string to “JSESSIONID” as specified for “r1, with an offset of “0”. Where the
string found is “JSESSIONID=0123456789abcdefg012345643352256", an offset of “0” will
mean that the hash string will start with “=”. If the offset is “7” the string will be parsed beginning
with the integer “6”.