Server passive cookie persistence, Example – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual
Page 291
Brocade Virtual ADX Server Load Balancing Guide
275
53-1003247-01
Server passive cookie persistence
5
Example
The Brocade Virtual ADX does cookie switching based on the cookie value of "ServerID" or "biz"
defined in either rule1 or rule2.
If both rule1 and rule2 are not hit but rule3 is hit, it will forward the request to server group 10 and
insert a cookie with name "biz", with path being "business".
If no rule is hit, the Brocade Virtual ADX will take the default action. It will forward the request to
server group 1 and insert a cookie with name "ServerID", which expires in 60 minutes.
csw-rule rule1 header "Cookie" search "ServerID="
csw-rule rule2 header "Cookie" search "biz="
csw-rule rule3 url prefix "/business"
csw-policy policy1
match rule1 persist offset 0 length 0 group-or-server-id
match rule2 persist offset 0 length 0 group-or-server-id
match rule3 forward 10
match rule3 rewrite insert-cookie "biz" "*" "/business"
default forward 1
default rewrite insert-cookie "ServerID" "*" "*" age 60
server virtual-name-or-ip test 10.2.2.222
port default disable
port http
port http csw-policy "policy1"
port http csw
port http keep-alive
bind http rs1 http
server real rs1 10.1.1.1
port http
port http url "HEAD /"
port http server-id 1100
port http group-id 1 1
port 8080
port 8080 server-id 1208
port 8080 group-id 10 10
server virtual-name-or-ip test 10.2.2.2
port default disable
port http
port http csw-policy "policy1"
port http csw
port http keep-alive
bind http rs1 http rs1 8080
NOTE
Make sure that the system time is configured when you configure cookie age.
Server passive cookie persistence
This feature provides connection persistence for flows where a cookie is dynamically injected by the
backend application server. With this feature enabled, the Brocade Virtual ADX monitors the server
reply and looks for a cookie with a specified name. The Brocade Virtual ADX then builds a hash
value based on the content of the cookie. This hash value is then stored in a sticky session