Forum Discussion
Rodney_Newton_7
Nimbostratus
Sep 21, 2006Pool selection using uri variables
I have a unit in test where test sites are added frequently so I am constantly adding pools to the bigip and using and iRule for pool selection similar to the following.
when HTTP_REQUEST { ...
Deb_Allen_18
Sep 22, 2006Historic F5 Account
hoolio is right, but you do sort of need to be a bit careful when using dynamic data to build a pool name, though.
Something like this would work, I think:
when HTTP_REQUEST {
extract the pool info from the URI
set uristring [findstr [HTTP::uri] "xx-" "/"]
check if the pool exists and has avail members
if {[active_members "testbed-$uristring"] > 0}{
pool testbed-$uristring
} else {
pool defaultpool
}
}peace
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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