Forum Discussion
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 application servers, one server in each DC, they both should serve the VIP.
Now the requirement is to send all traffic to just one server which lives in the same DC as where the VIP is currently active. So if the VIP is currently owned by DC1 LTM, all requests should be forwarded to server in DC1. Server in DC2 should be only used if server in DC1 becomes unavailable.
If there is VIP failover and it suddenly is listening on the LTM in DC2, all requests should be forwarded to server in DC2 (server in DC1 only as a backup in case of server DC1 failure).
What is the best way to achieve this? LTM policies, iRules? I don't know what the factor for the decision should be - something about the VIPs real IP, or the active/standby status of the LTM itself and somehow include it in the iRule?
8 Replies
- Srini_87152
Cirrostratus
Nice conversation!! I don’t believe this is good aproch either with irule based dc failover.
Thx Srini
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.
- Martin_Vlasko
Altocumulus
I persuaded the application team that it's not a good idea anyway, so I won't implement it. But having been discussing this I already wanted to understand what would happen shall I implement it.
Thanks for your support and help.
- Simon_Blakely
Employee
The DC link latency is for the HA status messages exchanged between the two LTMs.
If latency increases too much, or HA packets get dropped, then you may get unexpected failover events.
You may wish to consider increasing the network failover timeout from 3 secondssol7249: Overview of the network failover timer
You should also ensure that you configure multiple unicast Failover Network addresses between the two LTMs, preferably using independent DC/DC links.
- Martin_Vlasko
Altocumulus
Thanks for the tip with the RULE_INIT. Out of curiosity, why would the DC interconnect link latency matter in this exact situation? The irule should actually keep the traffic within a single DC.
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
