Forum Discussion

Martin_Vlasko's avatar
Martin_Vlasko
Icon for Altocumulus rankAltocumulus
Dec 18, 2017

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

  • 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's avatar
      Martin_Vlasko
      Icon for Altocumulus rankAltocumulus

      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's avatar
      Simon_Blakely
      Icon for Employee rankEmployee

      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 seconds

       

      sol7249: 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's avatar
      Martin_Vlasko
      Icon for Altocumulus rankAltocumulus

      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.