Forum Discussion
An iRules is a piece of code you can write that is processed as data is flowed through the BIG-IP from a client to the server application and back to the client. It's very flexible in the fact that you can make logic decisions about many aspects of what the BIG-IP does with the connection data. An example could be if you want to inspect the URI's going into a HTTP application. For all requests that go to a URI starting with /test, direct those connections to a specific test server. That would look something like this
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/test" } {
node 10.10.10.10 80
}
}
I wrote a series on the basics of iRules a while back. You can find the first article here:
https://devcentral.f5.com/articles/irules-101-01-introduction-to-irules
Colin revamped the series last year with this article to start with
https://devcentral.f5.com/articles/-the101-irules-101-introduction-to-programming-amp-tcl
You can also look in the iRules wiki for more links to documentation and sample iRules
https://devcentral.f5.com/wiki/iRules.HomePage.ashx
Hopefully this is enough to get you going...
-Joe