Forum Discussion
intelligent load balancing issue
Check this one
https://community.f5.com/t5/technical-forum/redirect-to-different-pool-based-on-url/td-p/197697
Dear Vaibhav,
No, it didn't work.
All traffic perhaps going to forst pool only.
any other clue
- VernonWellsFeb 22, 2022Employee
Jahmedj, following up on my comment below, you can use a Local Traffic Policy. I have a setup where any uri-path equal to /abc or starting with /abc/ goes to a pool using port 8080. Any uri-path equal to /xyz or startin with /xzy/ goes to a pool using port 8081. The node (server) set in each pool is the same. Here are the relevant snippets:
ltm virtual vs-http-01 { destination 10.1.10.100:http policies { pool-steer-by-uri-path { } } pool pool-8080 profiles { f5-tcp-progressive { } http { } } source-address-translation { type automap } translate-address enabled translate-port enabled vlans { clients } vlans-enabled } ltm pool pool-8080 { members { server01:webcache { address 10.1.20.20 session monitor-enabled state up } } monitor http } ltm pool pool-8081 { members { server01:tproxy { address 10.1.20.20 session monitor-enabled state up } } monitor http } ltm policy pool-steer-by-uri-path { controls { forwarding } requires { http } rules { "uri path abc exact" { actions { 0 { forward select pool pool-8080 } } conditions { 0 { http-uri path values { /abc } } } } "uri path abc starts_with" { actions { 0 { forward select pool pool-8080 } } conditions { 0 { http-uri path starts-with values { /abc/ } } } ordinal 1 } "uri path xyz exact" { actions { 0 { forward select pool pool-8081 } } conditions { 0 { http-uri path values { /xyz } } } ordinal 2 } "uri path xyz starts_with" { actions { 0 { forward select pool pool-8081 } } conditions { 0 { http-uri path starts-with values { /xyz/ } } } ordinal 3 } } strategy first-match }
This particular code does not strip the leading part of the URI path. Thus, if one goes to:
http://10.1.10.100/abc/def/file.html
then that is the same path (i.e., /abc/def/file.html) that would be sent to server01 port 8080, rather than, say, /def/file.html. The latter is possible, as well, if desired.
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