Forum Discussion
Elias_O_16228
Nimbostratus
Apr 22, 2013Redirecting request based on port number
I have two application servers as pool members to multiple pools. I want to be able to load balance based on port.
For example, If a user click first link, load balance staging pool. If user is...
Elias_O_16228
Nimbostratus
Aug 08, 2013Hi guys,
Can we revisit this issue once again?
To make it easier I decided to use port numer only for internal testing purpose rather than URL. Assumption is that if port works, then I will use URL
Below is the port only irule based on F5 training manual. It uses "switch". There is no error on this irule but it's not function as intended. Only the default pool dba_pool is working. Again, the pool member IP address is the same.
when CLIENT_ACCEPTED {
set MYPORT [TCP::local_port]
log local0. "Port is $MYPORT"
switch $MYPORT {
895 {
pool app_Dev_Pool
}
891 {
pool C_Dev_Pool
}
894 {
pool java_Dev_Pool
}
902 {
pool web_Dev_Pool
}
890 {
pool oracle_Dev_Pool
}
default {
pool dba_Dev_Pool
}
}
}
Thanks for your help.
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