Forum Discussion
Mike_73765
Nimbostratus
Aug 20, 2010issue with cookie persist irule
Hey guys, I am having an issue with an irule that I got from code share that is shown below. This irule is used on 2 virtual servers (using the same nodes, but different ports) and should be persisten...
Chris_Miller
Altostratus
Aug 30, 2010Just for kicks...please change your request event to this:
when HTTP_REQUEST {
If the cookie exists, connect to the IP specified in the cookie
if { [HTTP::cookie exists "cookie"] } {
if { ([HTTP::cookie "cookie"] ne "") } {
set persist_node [HTTP::cookie "cookie"]
log local0. "persist_node is $persist_node and server pool is [LB::server pool]"
set current_pool [LB::server pool]
foreach member [active_members -list $current_pool] {
set node [lindex $member 0]
if { $node eq $persist_node } {
node $persist_node [lindex $member 1]
}
}
}
}
}
This is less efficient as we're setting a variable for the selected pool, but I'm curious.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
