Forum Discussion
Sake_Blok
Nimbostratus
Mar 14, 2005iRule not using default pool
Hi,
I build an iRule that chooses a node, based on a server-id cookie. In the rule I check whether the cookie is present, if not, the rule defaults to the configured pool. If the cookie is...
unRuleY_95363
Mar 14, 2005Historic F5 Account
Yes, we know about this issue. The problem has to do with successive requests in the same connection. When the first request is complete, the serverside of the connection is detached. After the detach, we don't re-initialize the pool pick to the default one assigned on the virtual.
You can try the following modifications to your rule to save the default pool and reuse it, thus generalizing your rule to be used with many virtuals.
rule cookie_lbsid {
when CLIENT_ACCEPTED {
set defpool [LB::server pool]
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "lbsid"] } {
set tmp [findclass [HTTP::cookie "lbsid"] $::nodes_testlab " "]
if { $tmp ne "" } {
log local0. $tmp
node $tmp
} else {
log local0. "Not a valid cookie-value!"
pool $defpool
}
}
}
}
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