Forum Discussion
Craig_Jackson_2
Nimbostratus
Nov 11, 2008Parameters to iRules?
What's the best way to pass parameters to iRules?
I'm thinking of an iRule which will have a couple of parameters -- integer values which will control behavior. I'd like to figure out ...
hoolio
Cirrostratus
Nov 11, 2008Hi Craig,
As you suggest, you can either configure a global parameter in RULE_INIT (or in any event of any iRule) or you can use a datagroup (called a class in the bigip.conf). I don't think there is a significant difference between referencing a global parameter compared with referencing a class. You could test this using timing or by looping a few hundred or thousand references and comparing the times.
A reference to either object is checked on every attempt--there isn't any caching. Generally, I've suggested our clients use a global variable if it's something the administrator won't need to modify on a regular basis. If it's something an end user would need to view or change regularly a datagroup is probably easier. Modifying a global variable within the iRule requires reloading the entire rule, whereas modifying a datagroup doesn't.
Aaron
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
