Forum Discussion
Oct 01, 2013
possible to have multi-layered irules ?
I need to make changes to an existing prod instance of F5 BIG-IP LTM VE 10.2.4.
It has a virtual server configured with a single iRule that contains 2 simple switch statements that parse host ...
JRahm
Admin
Oct 01, 2013yes, you could do something like that by using variables to do so. I would be careful at the maintainability of such a solution. But basically:
Rule 1
priority 100
when RULE_INIT {
set static::trigger 0
}
when HTTP_REQUEST {
switch [LB::server pool] {
"pool1" { set static::trigger 1 }
"pool2" { set static::trigger 2 }
"pool3" { set static::trigger 3 }
}
}
Pool1 Rule
priority 110
when HTTP_REQUEST {
if { $static::trigger == 1 } {
do stuff
}
}
Edit->actually, LB::server pool probably won't be very accurate in HTTP_REQUEST, so you might need to move some of the logic to a later event. The flow from iRule->iRule mapping stands though.
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