Forum Discussion
iRule Event Order - HTTP
All, I'm in the process of creating a number of diagrams visually describing iRule event order for a number of reasons. Before I get busy making this all sexy and colourful, would anyone care to take a look and confirm I've got things right. I'll post the final version once it's done. I'm also hoping to add in some notes on any iRule commands which might affect the flow. Thanks.
Updated to v0.2 below as DC won't let me insert a picture in an existing comment it seems.
Updated to v0.3 below, now including server side events.
Updated to v0.4 below 11/Nov/2013
Updated to v0.5 below 11/Nov/2013
Updated to v0.6 below 12/Nov/2013
Updated to v0.7 below 12/Nov/2013 - events added
Update to v0.9 below 29/04/2014 - Updated to v9: added HTTP::disable and HTTP::enable commands and details on persistence.
Updated to v1.1 - June 2014. Added XML profile and event, other minor corrections.
Updated to v1.2 September 2014. Reordered some server side events, added further notes.
FYI here's the link for the HTTPS/SSL/TLS diagram
Note: The file listed below is the HTTP Event Flow order diagram...you can view/download this file as needed.
- Graham_33693Nimbostratus
HTTP:: commands aren't necessarily available when XML_CONTENT_BASED_ROUTING event fires. Whilst F5 documentation is a bit scarce on XML CBR, I know from experience that simple things like HTTP::respond don't work. For example, the following iRule fragment will generate a "command is not valid in current event context" error:
when XML_CONTENT_BASED_ROUTING { HTTP::respond 302 Location "http://www.domain.org" }
- What_Lies_Bene1CirrostratusHey gsvl, I will do some digging, thank you.
This is one of my favories, thanks for making it!
Just a tip: Seems like HTTP_RESPONSE_RELEASE happens after CACHE_RESPONSE.
/Patrik
- wamiq_007_24958Nimbostratus
This is beautiful! Thanks for sharing
- What_Lies_Bene1Cirrostratus
Thanks. You're welcome.
Thank you for your work on this.
- What_Lies_Bene1Cirrostratus
You're welcome.
Great flow diagram. High level question: if a virtual server has both an http irule and an LTM traffic policy, what is the order of processing?
- Stanislas_Piro2Cumulonimbus
Ltm policy request event is evaluated after irule CLIENT_ACCEPTED but before HTTP_REQUEST on each request.
- What_Lies_Bene1Cirrostratus
Thanks Stan.
Further to this discussion: https://devcentral.f5.com/s/articles/verifying-local-traffic-policy-and-irule-precedence-31680
 
https://support.f5.com/csp/article/K16590
 
the BIG-IP system now processes the local traffic policy rule (that pertains to HTTP events) before evaluating iRule HTTP events and commands. This behavior is by design and cannot be modified or reverted.
 
- Dan_PachecoCirrus
Great flow diagram. High level question: if a virtual server has both an http irule and an LTM traffic policy, what is the order of processing?
- Stanislas_Piro2Cumulonimbus
Ltm policy request event is evaluated after irule CLIENT_ACCEPTED but before HTTP_REQUEST on each request.
- What_Lies_Bene1Cirrostratus
Thanks Stan.
- Dan_PachecoCirrus
Further to this discussion: https://devcentral.f5.com/articles/verifying-local-traffic-policy-and-irule-precedence-31680?lc=1
https://support.f5.com/csp/article/K16590
the BIG-IP system now processes the local traffic policy rule (that pertains to HTTP events) before evaluating iRule HTTP events and commands. This behavior is by design and cannot be modified or reverted.
- Algebraic_MirrorCirrostratus
Hi. Can you please update the link to the iRule event order? The link is broken and does not go anywhere, probably due to the DevCentral transition to a new site.
look here: https://devcentral.f5.com/s/question/0D51T00006i7XB2/irule-event-order-httpsssl-client-server-side
- Algebraic_MirrorCirrostratus
That link works! Thanks so much!
Recent Discussions
Related Content
* 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