Forum Discussion
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_45640Historic 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.
- Kevin_Stewart
Employee
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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