Forum Discussion
Will_4436
Nimbostratus
Aug 09, 2012Direct traffic to a different pool based on HTTP or SOAP request.
Hi,
I hope someone can assist with the following problem:
F5 Configuration:
Single VS: 1.1.1.1
URL: http://www.domain.com/
URI: /app
Port: 443
Associated Pools: Pool A (servers receiving HTTP request) Port 1234
Pool B (servers receiving SOAP request) Port 5678
Scenario:
Both a SOAP and/or HTTP request will hit the same virtual server with the same URL and URI, separation via source IP address is not possible. A HTTP request must go to Pool A, while a SOAP request must go to Pool B.
Please see a traffic flow diagram here: http://postimage.org/image/x2o01l80r/
Any ideas on how to sperate the traffic to different pools?
Your help is greatly appreciated.
Regards,
Will
5 Replies
- Brian_69413
Nimbostratus
How about this:when HTTP_REQUEST { if { [HTTP::header exists SOAPAction] }{ pool Pool_B } else { pool Pool_A } } - Will_4436
Nimbostratus
Thanks Brian!
One thing I didn’t mention was that the VS is also used for other services, so the iRule must only divert traffic going to the URI of /app
Can this be incorporated in the same iRule? - nitass
Employee
Can this be incorporated in the same iRule?yes, you can check uri before.
e.g.when HTTP_REQUEST { if {[string tolower [HTTP::uri]] starts_with "/app"} { if {[HTTP::header exists SOAPAction]} { pool Pool_B } else { pool Pool_A } } } - hoolio
Cirrostratus
If you're only selecting a pool in some of the iRule cases, make sure to add a OneConnect profile to the virtual server to ensure each HTTP request is load balanced to the correct pool.
https://devcentral.f5.com/wiki/AdvDesignConfig.ONECONNECT.ashx
Aaron - Will_4436
Nimbostratus
Thats great. Worked a treat. Thanks guys!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
