Forum Discussion
Brian_Gibson_30
Nimbostratus
Jun 25, 2014Using an Irule to load balance between multiple pools
Does anyone know of a way to create an Irule to load balance connections between multiple pools?
I have a need to load balance between 4 pools of 2 servers each.
Jun 25, 2014
Ok, it ain't pretty, but what about something like this?
when CLIENT_ACCEPTED {
Returns 1 or 2 based on IP
set poolselection [expr {[crc32 [IP::client_addr]] % 2 }]
if { $poolselection eq 1 } {
if { [active_members pool1] > 0 } {
pool pool1
} else {
pool pool2
}
} else {
if { [active_members pool2] > 0 } {
pool pool2
} else {
pool pool1
}
}
}
/Patrik
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