Forum Discussion
multiple iRules
How would you handle multiple scripts.
One single iRule or multiple iRules?
- Vijay_E
Cirrus
In my opinion, if possible, try and keep it as a single iRule. Lot more easier to manage.
- Lee_Sutcliffe
Nacreous
I would disagree with Vijay_E, in my option, using multiple, more concise iRules and using priority to control the order they are triggered is a much better option.
smaller iRules are easier to manage, priority gives the control over what happens in what order
# iRule 1 when HTTP_REQUEST priority 10 { # triggered first } # iRule 2 when HTTP_REQUEST priority 20 { # triggered second }
- mrgilchen
Altostratus
- Lee_Sutcliffe
Nacreous
Could you clarify what you mean by mixed load balancing?
Priority only ensures rules are executed in the preferred order.
- mrgilchen
Altostratus
I run 2 scripts.
Each script check LB to get the client IP match with a pool by subnet.
So the 2 scripts are giving me the same results.
I check for client IP.
Script1:
set strSelectedPool [class match -value [IP::client_addr] equals "MEM-Manager-Subnet-To-Pool-Pairs"]
pool $strSelectedPool
Scrip2:
set strSelectedPool [class match -value [IP::client_addr] equals "ORG-Manager-Subnet-To-Pool-Pairs"]
pool $strSelectedPool
In that case when a request comes, it will mix the pools. and get the same result.
- Hamish
Cirrocumulus
I'm with Lee on this one. Multiple iRules.
In computers as in life, simple is best. It's more robust, easier to fix etc etc.
Recent Discussions
Related Content
* 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