Failover delay and failback delay

Global Traffic Management properties with liveness tests contain settings for failover delay and failback delay. These settings work together to allow you to switch the traffic between your primary and secondary data centers.

Consider this example: the GTM domain example.com.akadns.net has a property named property1, with a primary data center DC1.example.com and a secondary data center DC2.example.com.

As the primary data center, DC1.example.com is expected to be available at any time. If for some reason DC1 goes down, end users will receive error messages. You can resolve the errors by moving traffic from DC1 to another data center. If you are not using GTM, it might take an IT team at least 30 minutes to move the traffic from DC1. GTM can quickly move your traffic from DC1 to another data center based on your property's failover and failback settings.

In this example, the failover delay and failback delay settings are both 300s (5 minutes) for property1. If you enabled liveness tests, GTM detects the failure as soon as liveness tests start failing for DC1. GTM does an internal calculation of scores returned by the liveness test, and depending on these scores, GTM determines a cut-off score. If the aggregated score of liveness tests from all the liveness testing agents extends beyond this cut-off value, DC1 will be marked as down.

Because the failover delay in the example is set to 5 minutes, GTM will not mark DC1 as down immediately upon detecting this failure. Instead GTM schedules a time (a 5-minute failover delay time) in the future to mark DC1 as down. After 5 minutes, GTM evaluates the score once again to see whether the situation has changed. If the score remains unchanged, DC1 is marked as down and all the traffic is moved to DC2.

Failback delay works in a similar manner but in reverse, as the traffic is now on DC2. For example, let's say DC1 went down because of a power outage. You switched to backup power and manually checked that DC1 is functioning again. When DC1's liveness test starts returning successful responses, the liveness score improves and falls below the cut-off score. The moment the liveness test falls below the cut-off score, GTM schedules a time (5 minutes in the future) to mark DC1 as up. After 5 minutes, GTM verifies whether or not the situation is sustained. If it is sustained, DC1 is marked as up and all traffic reverts to DC1.

Failover delay and failback delay both default to zero seconds. You can adjust them as desired to meet your needs.
Note: If liveness tests are failing for both data centers, the traffic remains on the primary data center even if it is down.