Forum Discussion
Jaymz_mynes_653
Nimbostratus
Nov 30, 2006Efficient iRule writing
I am getting ready to create some iRules and because the rules are going to cover a lot of area I am concerned about the efficiency in which they are written. Here is the scenario, I have just put to...
hoolio
Cirrostratus
Nov 30, 2006If you have 80 URI's to match against, it would probably be easiest to administer if you defined them in a class (data group in the GUI) and used the matchclass function to perform the test.
Here's an example class:
class uris {
"/uri1/"
"/uri2"
}
And a rule that references the class:
when HTTP_REQUEST {
if { [string tolower [matchclass [HTTP::uri]] contains $::uris] }{
node 10.102.180.69 80
}
}
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