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

Hello @Brandon_TN

You could use an External Monitor with a custom script to achieve you goal
check this myF5

You could then create a dummy Virtual server with a dummy pool and assign the external monitor to it
And finally use this dummy VS as Dependency for you actual VS in GSLB

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

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.

Hi @VishnuGatla is there such an option?
I couldn’t find it.

Yes, we have that option under GSLB pool config.

image_342613.png

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

 

But in GTM this actually checks available virtual servers not backend servers.

In Ltm also min active members just enable priority group members, does not mark pool as unavailable.

Also the old F5 DNS/GTM “Dependency List” option is nice under the Virtual Server https://techdocs.f5.com/kb/en-us/products/big-ip-dns/manuals/product/bigip-dns-concepts-12-0-0/2.html#taskid

Hello @Brandon_TN

Did you managed to test it?