Forum Discussion
LB members within a redirect iRule
Have a working iRule to redirect a specific source IP to a specific pool member. Now want to add load balancing between 3 pool members within that pool via the iRule.
I know a redirect between many pools would allow for the LB method of the pool to handle this, but we want to use one pool, since we will have many redirects.
Current iRule (12.1.1 HF1 code)
when CLIENT_ACCEPTED {
set client [IP::client_addr]
if {$client equals "1.1.1.1" } {
pool my-pool member 10.10.10.10 1025
}
elseif {$client equals "2.2.2.2" } {
pool my-pool member 10.10.10.10 2025
}
else {
pool my-pool member 10.10.10.10 25
}
}1 Reply
- Vijay_E
Cirrus
As a rule of thumb, a pool should contain pool members using the same port. For example: POOL_1025 has pool members that listen on port 1025 and POOL_2025 has pool members that listen on port 2025 etc. This will help in troubleshooting and helps you to scale the configuration over time.
Having said that your iRule looks reasonable for what you are trying to achieve.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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