Forum Discussion
2 and more irules together
Hello Kouriada,
Generally, anything that can be done without an iRule is best done without an iRule. They are a very useful tool for doing something that could not otherwise be done, but they affect performance much more heavily.
As for your other question, the way a BIG-IP interprets iRules, there is no functional difference between having a single iRule with all of your code or multiple iRules with smaller snippets, as long as they are all triggered by the same event.
When an iRule is saved into your configuration, it basically gets broken down and sorted by events. This means that the flow of the iRule from that point on is event-based, and the TCL engine runs through only the events that trigger instead of the rest of your code. Thus, if you have a single iRule with a couple different events inside it, vs multiple iRules with only a single event, or your example, where multiple iRules have the same event, it makes no difference.
This, while incredibly beneficial, can lead to some issues with organization. Generally, my coworkers and I try to keep an iRule organized by functionality instead of by events. With your example above, I think it makes more organizational sense for your code to be within a single iRule.
This article here has a lot of good information on iRules, and this one has some tips on optomization.
Feel free to ask if you have any questions,
Austin
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