Forum Discussion
pool member not sticking after switch statement
BigIP Ha pair version 12.1.2 HF2 I need the iRule to select the pool member based on the uri, and keep that pool member throughout the session, and swap out the uri with "/em". iRule is going in and properly selecting the switch statement that matches, and setting the pool/member and changing the uri to "/em".
Then it starts loading the page, the iRule runs again, and the pool member changes base on which on was next in the round robin selection of the pool. How can I get the member to stay as originally selected? I tried adding
persist sticky
after the pool statement. but that did not work.
Thanks for any help.
when HTTP_REQUEST
{
set myuri [string tolower [HTTP::uri]]
if {not ([HTTP::uri] starts_with "/em")}
{
switch [HTTP::uri] {
"/01"
{pool Ora_Admin_Pool member 192.168.100.101 7001
HTTP::uri "/em"
log local0. "EM 01"
}
"/02"
{pool Ora_Admin_Pool member 192.168.100.102 7001
HTTP::uri "/em"
log local0. "EM 02"
}
"/03"
{pool Ora_Admin_Pool member 192.168.100.103 7001
persist sticky
HTTP::uri "/em"
log local0. "EM 03"
}
default {
HTTP::respond 200 content "Restricted
Website Error: Restricted
NOTICE: Website is restricted.
"
}
}
}
log local0. "[LB::server]"
}
Recent Discussions
Related Content
* 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