Forum Discussion
Brandon_Burns_8
Apr 02, 2008Historic F5 Account
iRule Optimization help
I have this iRule that works, but it seems there should be a way to do this more efficiently. Can anyone help out with this? I don't know if the switch command would be of an value here.
Thanks
when CLIENT_ACCEPTED {
if {[
matchclass [IP::local_addr] equals $::NG_Bypass_IP] or [active_members NG_Pool] == 0 and [active_members Cache_Pool] == 0 or not [matchclass [IP::client_addr] equals $::NG_Clients] } {
forward
}
elseif {
[active_members NG_Pool] > 0} {
pool NG_Pool
}
elseif {
[active_members Cache_Pool] > 0 and not [matchclass [IP::local_addr] equals $::Cache_Bypass_IP]} {
pool Cache_Pool
}
else {
forward
}
}
when LB_FAILED {
reject
}
1 Reply
- The_Bhattman
Nimbostratus
From what i see i don't see how the switch is going to work for you. However, what you can do is check is how well it is evaluating the irule. Click here if you want to take a look at "timing on" which allows you to collect statistics.
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