Improve AlwaysOn failover time

availability-groupsfailover

I have set up an AlwaysOn with a primary and secondary replica on different subnets but I have been forced to use Registerallprovidersip set to 1. This causes the listener to only have 0 IP address in DNS which means I am at the mercy of DNS replication when a failover event occurs as it will take sometime for the listner's IP to update.

Has anyone in a similar situation found ways to improve failover time?

Best Answer

You should modify the registerallprovidersip setting in conjunction with changing the time to live (TTL) for the records.

Without modifying the default TTL, the registration lives too long. Sadly there is still a delay but dramatically reducing the TTL helps.

Ideally you should see what you can do to get the client connections to specify multi subnet failover and not have to do this workaround. But with the TTL being lowered, you should be fine, I've done that with several clients and it all works out alright. It still won't instantaneous.

You can see more about these settings working in conjunction with each other here.