Universal Persistence iRule
I want to use Universal Persistence iRule across the two virtual-servers (whose pool-member's nodes are the same).
One virtual-server reply HTTP_RESPONSE whose Location contains the string (ticket=****).
A client sends to another virtual-server HTTP_REQUEST whose URI contains the string(ticket=***).
Those two connections must be used the same node.
I have made a iRule below, but it doesn't work well..
What is wrong with this?
when HTTP_RESPONSE {
set ticketid [findstr [HTTP::header Location] "ticket" 7]
if { $ticketid != "" } {
persist add uie [HTTP::header $ticketid]
}
}
when HTTP_REQUEST {
if { [HTTP::uri] contains $ticketid } {
persist uie [HTTP::header $ticketid]
}
else {
persist uie [HTTP::cookie ""]
}
}
Thanks.