iRules Procedures (procs)


**Warning: The use of iRule procedures can cause core dumps on some older versions of BIG-IP: K14654 **

One of the most highly requested, sought after, demanded iRules features of all time is finally delivered. Ladies and gentlemen, iRules procedures (procs) are now supported in iRules (as of 11.4)! For those of you not jumping for joy just yet, clearly you must not quite know what procs are, or why they’re so exciting. Allow me to illuminate.
Procedures (procs) are a coding practice by which a user is able to succinctly define a section of code to later be referenced. For instance, if I write a really great little header insert section of code, and realize I may want to use it again later, I can save it as a proc. Rather than having to copy and paste the code into the next iRule that needs to make use of it, for it and all other iRules I would merely have to call the procedure I created with the appropriate parameters and poof, the code I saved previously in proc form is executed, the appropriate actions are taken, and my code remains all the cleaner for it.
Procs will allow you greater flexibility in programming, code re-use, and a simpler than ever way to share and consume iRules functionality. With a much more modular approach the community will be able to provide, share and download individual chunks of functionality in addition to complete iRules solutions. This will make it by far easier to piece together functionality for your particular solutions, tailored just as you need them.
Procedures are one of the most exciting, largest leaps forward in iRules functionality in quite some time, and certainly the most user requested. Further documentation on exactly how to make use of this powerful technology can be found here on DevCentral. Also, keep an eye out for a series of articles walking through exactly how to use procs and some examples of what can be done. There is definitely more to come…soon.
See the proc and call pages for details.

Procs Resources

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.