F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Edgar_123903's avatar
Edgar_123903
Icon for Nimbostratus rankNimbostratus
Jan 02, 2014

BIG-IP LTM and ASM - Read xml package to extract information and redirect traffic

Is there any way to extract information from an XML package with SSL communication with a web server and extract a reference id and if it meets the condition redirect the traffic to another pool.

 

The F5 has the SSL certificates in order to do the decryption.

 

I need to known how to make that request in an irule

 

2 Replies

  • John_Alam_45640's avatar
    John_Alam_45640
    Historic F5 Account

    in a normal forwarding or proxying scenario, in order to get the XML response, the bigip already made a load balancing decision. You can inspect the traffic and pick up the reference id, the easiest would be to parse the HTTP::payload. Examples here: link text

     

    Once you made the decision on where to forward the traffic next, you can chose the node via the "node" commmand and rerun the request through the proxy using the HTTP::retry command. link text

     

    An alternative is to use a sideband connection to probe the server and analyze the response before the BigIP makes an LB decision: examples can be found by searching on this site.

     

    HTH.

     

  • If I may add, the XML Content Based Routing feature in LTM can also do this. It's an XML profile and associated iRule. The XPath configuration in the profile can be a little tricky, but once you have it capturing the right value, the iRule is fairly straight forward. here's an example:

    when XML_CONTENT_BASED_ROUTING {
        switch $XML_values(0) {
            "12345" {
                pool pool_a
            }
            "67890" {
                pool pool_b
            }
        }
    }
    

    As John alludes, depending on when the XML data presents itself in the request, you may have already made a load balancing decision, and/or may need to add some additional persistence tracking if the request is part of a larger session.