Denali Multi-Site Cluster – DNS Latency Issues During Failover – How to change HostRecordTTL

While I was playing around with my Denali Multi-Site Cluster, I noticed that sometimes you can have DNS Latency Issues During a Failover.

When the SQL Server cluster instance fails over to another subnet, the online IP address changes accordingly. Windows failover cluster issues a DNS update immediately after the network name resource name comes online. However the client connections will not reflect the DNS update due to the local DNS cache on the client machines, and possible DNS replication latency if the cluster nodes and the client machines are not using the same DNS server. Therefore, the client machines cannot resolve the network name causing connection failure until the DNS replication is complete and the local DNS cache is timed out.

To minimize the client downtime, Microsoft recommends setting the HostRecordTTL to 60 seconds for most multi-subnet clustering environment.
The default value of the network name resource private property HostRecordTTL is 1200 seconds. Before making the HostRecordTTL value change, please consult your DNS server administrator to make sure your DNS server can handle the increased query request from database client machines.

You can find more details here http://msdn.microsoft.com/en-us/library/ff878716(v=SQL.110).aspx

Below you can find the procedure how I changed the HostRecordTTL on my Denali Multi-Site Cluster

Step 1: Login on your active cluster node
Open the Failover Cluster Manager.  Below you can see a screenshot of my cluster

Step 2: Retrieve your Network Name Resource.

For me, the Failover Cluster Manager is not very clear, so I looked it up with the following command in a command prompt:

cluster res

After you executed the command, you find a list of all your cluster resources.  Look for the cluster resource that start with “SQL Network Name”.  See screenshot below

Step 3: Retrieve the current value of the HostRecordTTL

To retrieve the HostRecordTTL current setting, I executed the following command:
cluster /cluster:DENALLICLUSTER res “SQL Network Name (DENALISQL)” /priv

Remark: Change the cluster name and resource name according to your installation

After you executed the command, you find a list of all the properties of the resource.  Look for the HostRecordTTL properties and check the value.
Default value is 1200 seconds. See screenshot below.

Step 4: Change the HostRecordTTL value

To change the HostRecordTTL value, execute the following command

cluster /cluster:DENALLICLUSTER res “SQL Network Name (DENALISQL)” /priv HostRecordTTL=60

Remark: Change the cluster name and resource name according to your installation

After you have executed the command, you will get a warning stating that you have to bring your resource off line before your new setting will take affect. See screenshot below.

Step 5: Verify if your new value

To confirm that your new setting will be applied, execute the following command again:

cluster /cluster:DENALLICLUSTER res “SQL Network Name (DENALISQL)” /priv

Remark: Change the cluster name and resource name according to your installation

Step 6: Take your resource offline and online

Take the clustered service or application offline and bring it back online, using the method that you are most familiar with

2 comments on “Denali Multi-Site Cluster – DNS Latency Issues During Failover – How to change HostRecordTTL

Leave a Reply

Your email address will not be published. Required fields are marked *