I hit an issue recently where I thought I knew what was what but found myself doubting my knowledge. To that end, here’s a diagram detailing the iRule event order where HTTP traffic is concerned – I’ll follow up shortly with one for HTTPS flows. I’d be grateful to any F5’ers out there that can pick holes in this, if any.
Apologies for the ‘slimming’ of the diagram caused by the WordPress theme. Right click and view in a new tab or save as to see it in all it’s glory.
Last updated September 2014.
See here for the iRules HTTPS/SSL event diagram.
What Are Events?
Events are used as a trigger or driver to execute rules and the Commands within them (this code could be referred to as an Event Handler); in other words, iRules are Event driven. There are a wide range of Events available, covering network through to application layers allowing for the maximum possible flexibility and control.
A single rule can contain multiple Events; all Event names are UPPER CASE and never contain spaces.
If you specify an Event that is related to a module that isn’t licensed, no error will be returned, however, the Event will never trigger.
Events are typically related to a unique connection or session only.
Events are specified as follows: when EVENT_NAME. Here are some examples;
- when CLIENT_ACCEPTED – initiated when an IP connection is accepted and established.
- when HTTP_REQUEST – initiated when a client HTTP request is received.
- when LB_SELECTED – initiated when the system selects a Pool Member.
A full list of Events and further information about them can be found here: https://devcentral.f5.com/wiki/iRules.Events.ashx.