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.
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
}
}
}
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.