Forum Discussion
roblof_255673
Nimbostratus
Mar 23, 2016Redirect traffic to a specific node in a pool depending on URL using iRules
Two months on the meter with F5 and now I need some help with iRules.
I want "www.domain.com/x/login" to be directed to two specific servers test1 and test2 in pool "tool-test"
and "www.domain.c...
Josiah_39459
Mar 23, 2016Historic F5 Account
It's possible with an elaborate irule using the pool member command and programming your own load balancing algorithm--but then you are losing pretty much all the benefit of having them in a pool in the first place (and you could just as easily use the node command).
Why not have two pools?
roblof_255673
Nimbostratus
Apr 05, 2016Need some more help on this matter.
I have now divided the four servers I have into two pools. tool-uat and tool-oslc.
tool-uat is the default pool that is connected to the virtual-server.
Domain "https://uat.domain.com/uat1/login" is working which the servers in pool tool-uat
Domain "https://uat.domain.com/uat1/oslc/login is not working which is the servers on pool tool-oslc
I have created an iRule that is attched to the virtual-server
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"oslc*" {
pool tool-oslc
}
default_pool {
pool tool-uat
}
}
}
Have also tried:
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]] {
switch -glob $uri {
"/oslc/login/" {
pool tool-oslc
}
default {
pool tool-uat
}
}
}
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