Forum Discussion

wlepkin_98758's avatar
wlepkin_98758
Icon for Nimbostratus rankNimbostratus
Jun 06, 2014

Order of XML_CONTENT_BASED_ROUTING execution

Hi, I've seen all the nice charts showing the order of http event execution, but can't find anything showing how that might relate to XML_CONTENT_BASED_ROUTING event execution.

 

I have an HTTP_REQUEST event that changes the path of the request, and an XML_CONTENT_BASED_ROUTING event that modifies the pool used in the case of a certain combination of values. But if the XML_CONTENT_BASED_ROUTING values match, I don't want to change the path of the request. What can I put in the XML_CONTENT_BASED_ROUTING event coding that prevents the HTTP_REQUEST event from firing?

 

I've read about priority, but that doesn't seem to apply because the event types are different (perhaps that's not correct). Event disable and return seem to apply, but only if the XML_CONTENT_BASED_ROUTING fires first.

 

Can I execute the HTTP_REQUEST code from within the XML_CONTENT_BASED_ROUTING event code, just without the when statement?

 

Thanks very much.

 

Wayne

 

4 Replies

  • OK, so my understanding after some research is this;

     

    • If the XML_CONTENT_BASED_ROUTING event fires, the HTTP_REQUEST event will not
    • HTTP:: commands should work in XML_CONTENT_BASED_ROUTING but I've seen some posts suggesting this was an issue back in 2012 with SSL terminating VSs but hopefully won't be now.

    Can you add some logging to your iRule to confirm this perhaps? I'd love to add this to the event iRule diagrams.

     

  • Hi, thanks for the response.

     

    It seems that the old post was correct, and HTTP_REQUEST fires first no matter what, at least in LTM 11.4.0, even if the two events are in separate iRules with the XML_CONTENT_BASED_ROUTING iRule first in the order. But HTTP:: commands do work with an XML_CONTENT_BASED_ROUTING event, so I've just incorporated them into that and it's working the way I want.

     

    Thanks again for your help. I guess I could have easily figured this out without posting, but now others know too.

     

    Wayne

     

    • What_Lies_Bene1's avatar
      What_Lies_Bene1
      Icon for Cirrostratus rankCirrostratus
      Ahh great. Yes, very worthwhile and now I can update the event order diagrams which will further extend that. Did you work out which fired first?
    • wlepkin_98758's avatar
      wlepkin_98758
      Icon for Nimbostratus rankNimbostratus
      I've tested with only two events, HTTP_REQUEST and XML_CONTENT_BASED_ROUTING, and I found that no matter what I do HTTP_REQUEST fires first. That is, whether both events are in the same iRule with XML_CONTENT_BASED_ROUTING first, or in separate iRules with the XML_CONTENT_BASED_ROUTING rule first in the order, HTTP_REQUEST still fires first.