Forum Discussion
boneyard
MVP
Mar 07, 2012looking to optimize / generalize irule
i have an irule which selects a pool based on several known items (think: uri, client ip, port). i have many of these sets, so some strings and a poolname. currently this is all hard coded in the irul...
boneyard
MVP
Mar 09, 2012checked the above and this indeed works.
if { [class match -value ip equals [virtual name]_class] == [IP::client_addr] and [class match -value port equals [virtual name]_class] == [TCP::local_port]} {
set pool [class match -value pool equals [virtual name]_class]
log local0. "$pool"
pool $pool
}
it just depends on having different virtual server names, would be nice to be independent of that. of course i can come up with some naming scheme that would allow this.
still id like to try to keep it more generic, the general idea is that i have several sets of sets of variables to compare with the provided ones (via some method) and then select a pool.
i don't need full code, just some pointers on how to handle this.
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