Forum Discussion

Brandon_TN's avatar
Brandon_TN
Icon for Nimbostratus rankNimbostratus
Jul 17, 2025

failover issue between datacenters with GSLB

Ok I have been looking for the best solution for an application requirement. 

 

I have an app that will be living in two datacenters. Each location has 4 servers running. What they want is the application to run 100% of the time in DC1 unless 2 or more servers fail in DC1 and then failover to DC2 

 

I thought this would be rather easy, but I have been unable to find a way to get the VIP to go into a down state if two servers have gone down. 

 

Does anyone have a idea how I could implement this? 

 

Thanks

8 Replies

  • VGF5's avatar
    VGF5
    Icon for Cumulonimbus rankCumulonimbus

    Update GSLB pool configuration with Minimum Active Members to 3. This means the VIP will be marked down if fewer than 3 servers are up (i.e., if 2 or more fail) . The BIG-IP DNS monitors the VIP. If the VIP is down, GTM will failover to DC2.

      • VGF5's avatar
        VGF5
        Icon for Cumulonimbus rankCumulonimbus

        Yes, we have that option under GSLB pool config. 

        If we are doing in LTM, K11428303: Priority group assigned to pool members does not take effect

         

  • here is an example 

    #!/bin/bash
    POOL="Your_Pool_name"
    THRESHOLD=2
    
    UP_COUNT=$(tmsh show ltm pool $POOL members | grep "Available Members" | awk '{print $4}')
    
    echo "[$(date)] Pool $POOL has $UP_COUNT members up" >> /var/log/pool_monitor.log
    
    if [ "$UP_COUNT" -lt "$THRESHOLD" ]; then
        echo "[$(date)] Pool DOWN: Only $UP_COUNT members up" >> /var/log/pool_monitor.log
        exit 1
    else
        echo "[$(date)] Pool UP: $UP_COUNT members up" >> /var/log/pool_monitor.log
        echo "Pool is healthy" 
        exit 0
    fi