Forum Discussion
Singh_74932
Nimbostratus
Oct 08, 2008conditional select
Ok here is what i want to do and i tried witting some thing my self this time :
Logically :
if host name = xyz.com
then select pool member a from
...
hoolio
Cirrostratus
Oct 08, 2008You can just use the pool command with the member. You don't need to use LB::reselect in this case. The pool wiki page has some examples (Click here).
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "xyz.com" } {
pool myPool member 10.1.2.100 80
} elseif {[string tolower [HTTP::host]] equals "abc.com" }
pool myPool member 10.1.2.200 80
} else {
take some default action?
}
}
You might also want to check if the pool member is up before using it. You can do this with LB::status pool member (Click here)
Aaron
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