Forum Discussion
Farshad_249798
Cirrus
You need to track a unique local id somehow and then use irule to select pool member based on that id. Haven’t tested this but I would use tcl_platform(machine) to get hostname assuming they are different.
Simon_Blakely
Dec 19, 2017Employee
I hope the DC's have a low-latency interconnect for HA. I suspect that you will encounter unforseen issues with this implementation.
The only other recommendation I can make:
Shift the static variable declaration to RULE_INIT for efficiencywhen RULE_INIT {
set f5 $static::tcl_platform(machine)
}
when CLIENT_ACCEPTED {
if { $f5 equals "f5DC1.mydomain.com" } {
pool pool_APP_DC1_DC2
} elseif { $f5 equals "f5DC2.mydomain.com" } {
pool pool_APP_DC2_DC1
} else {
log local0. "Error: machine info invalid!"
reject
}
}