Forum Discussion
Martin_Vlasko
Dec 18, 2017Altocumulus
Load balance to node in the same DC where VIP is active
Hi,
We have following (simplified) scenario:
Two data centers: DC1, DC2.
Two F5 LTMs, one LTM in each DC, they run in active/standby mode and have one VIP configured.
Two applicat...
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
}
}
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