Forum Discussion
Chris_Miller
Altostratus
Aug 17, 2010"Event Disable"
I have my LTM checking to see whether a certain cookie exists as part of the HTTP_REQUEST event. If the cookie does exist, I don't need to insert a cookie in the HTTP_RESPONSE event.
Currently, I'm simply setting a variable to "1" if the cookie's detected and checking the value of the variable during the HTTP_RESPONSE event to see whether it should continue.
Would it be better to simply use the "Event" command to disable the HTTP_RESPONSE event? So, as part of my "if cookie exists" statement, I'd also be doing "event disable HTTP_RESPONSE"
http://devcentral.f5.com/wiki/default.aspx/iRules/event.html
- naladar_65658
Altostratus
I would say use the event command to disable it in that case for sure. Once you have already done one comparison in the request why do another in the response if you can keep from it? The best thing to do in this case would be to run the timing command on both iRules and then throw some traffic at it to see what is going to be more computationally expensive. http://devcentral.f5.com/wiki/default.aspx/iRules/timing - Chris_Miller
Altostratus
I'm still a bit confusd about the command.Enables or disables evaluation of the specified iRule event, or all iRule events, on this connection. However, the iRule continues to run.
- hoolio
Cirrostratus
If you wanted to selectively run HTTP_RESPONSE depending on whether some condition is true in HTTP_REQUEST, you could explicitly disable/enable HTTP_RESPONSE in all cases from HTTP_REQUEST.
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