SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


AlwaysON Multi Subnet Cluster, AG Listener


AlwaysON Multi Subnet Cluster, AG Listener

Author
Message
Steve Q-426954
Steve Q-426954
SSC Rookie
SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)

Group: General Forum Members
Points: 48 Visits: 256
Hello

I am not sure if this is a SQL issue or Windows Cluster issue, but am trying to rule out it being a SQL issue.

When I fail an availability group between subnets, I am finding that the DNS entry in DNS is staying. So what happens is the Availablity Group listener has 2 records in DNS, one for each IP. This causes the App to timeout at times, since DNS will return either of the two IP's.

Anyone ever run into this before?

Qsac
Matan_Yungman
Matan_Yungman
SSC-Enthusiastic
SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)

Group: General Forum Members
Points: 181 Visits: 221
.
Matan_Yungman
Matan_Yungman
SSC-Enthusiastic
SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)

Group: General Forum Members
Points: 181 Visits: 221
Hi Steve,
Have you solved the issue?
Steve Q-426954
Steve Q-426954
SSC Rookie
SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)

Group: General Forum Members
Points: 48 Visits: 256
No I have not, please let me know if you have any insight.

Steve
Steve Q-426954
Steve Q-426954
SSC Rookie
SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)SSC Rookie (48 reputation)

Group: General Forum Members
Points: 48 Visits: 256
I think I figured this out. It is done by design.

The App team has to add some new parameters to the connection string. Here is MS Link for more Info.

http://msdn.microsoft.com/en-us/library/hh205662.aspx

Thanks to all for the supports
Steve
Matan_Yungman
Matan_Yungman
SSC-Enthusiastic
SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)SSC-Enthusiastic (181 reputation)

Group: General Forum Members
Points: 181 Visits: 221
Brilliant!
Here's another good link for completion:
http://msdn.microsoft.com/en-us/library/ff878716.aspx

Thank you Steve
btuck
btuck
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 121
I have had to do A LOT of research on this subject due to implementing a multi-subnet cluster here at my company. (For my situation, we're using Windows Server 2008 R2 SP1.) Your problem could be one of two things:

By default, when you create the Availability Group Listener, the RegisterAllProvidersIP setting will be set to 1. That means that both subnet's IPs will be attached to the DNS A-record (i.e. your listener's name). If you are using older database clients that don't support the MultiSubnetFailover option, these clients will try to arbitrarily connect to only one of those IPs. This will result in 50% of your requests timing out.

If you have RegisterAllProvidersIP set to 0, then only the online subnet's IP will be registered with DNS. This removes the 50% timeout problem above. However, keep in mind that you now need to consider your DNS replication settings and the HostRecordTTL property. When a failover occurs, the new, active node will make the update to the domain controller that it talks to. Since it's a different subnet, there's a good chance that this is a different domain controller than the previous, now "offline" node. Depending on which DNS you're looking at, you may or may not see the update immediately. Once DNS replication runs, all DNS records should match. That said, the local DNS cache on your client will rely on the HostRecordTTL property to know when to go out and get a fresh copy. The default for this value is 20 minutes, which means that you could wait up to 20 minutes to point to the new subnet's IP. Consider lowering this value to 5 minutes (or less) if you don't mind the extra network traffic to request DNS records.

The HostRecordTTL and RegisterAllProvidersIP settings are done on the Availability Group Listener cluster resource, not through DNS, AD, or the cluster itself.

Feel free to send me a message if you need any more info!

-Brandon
dhodun
dhodun
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 69
Hi Brandon,

I'm running into the same exact issue. I'd like to offer a multi-subnet AlwaysOn AG environment to all my applications with no additional configuration on their end, similar to how Failover Cluster Instances in a traditional SQL cluster provides HA transparent to the application.

What settings did you settle on? I don't like the idea of 5 minute failovers but 50% timeouts wouldn't work at all :/

-Drew
btuck
btuck
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 121
Hi Drew-
I would suggest a 2-5 minute HostRecordTTL and a RegisterAllProvidersIP set to 0 in your scenario.
muth_51
muth_51
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2409 Visits: 2928
btuck (5/6/2013)
I have had to do A LOT of research on this subject due to implementing a multi-subnet cluster here at my company. (For my situation, we're using Windows Server 2008 R2 SP1.) Your problem could be one of two things:

By default, when you create the Availability Group Listener, the RegisterAllProvidersIP setting will be set to 1. That means that both subnet's IPs will be attached to the DNS A-record (i.e. your listener's name). If you are using older database clients that don't support the MultiSubnetFailover option, these clients will try to arbitrarily connect to only one of those IPs. This will result in 50% of your requests timing out.

If you have RegisterAllProvidersIP set to 0, then only the online subnet's IP will be registered with DNS. This removes the 50% timeout problem above. However, keep in mind that you now need to consider your DNS replication settings and the HostRecordTTL property. When a failover occurs, the new, active node will make the update to the domain controller that it talks to. Since it's a different subnet, there's a good chance that this is a different domain controller than the previous, now "offline" node. Depending on which DNS you're looking at, you may or may not see the update immediately. Once DNS replication runs, all DNS records should match. That said, the local DNS cache on your client will rely on the HostRecordTTL property to know when to go out and get a fresh copy. The default for this value is 20 minutes, which means that you could wait up to 20 minutes to point to the new subnet's IP. Consider lowering this value to 5 minutes (or less) if you don't mind the extra network traffic to request DNS records.

The HostRecordTTL and RegisterAllProvidersIP settings are done on the Availability Group Listener cluster resource, not through DNS, AD, or the cluster itself.

Feel free to send me a message if you need any more info!

-Brandon


Brandon- I am facing exactly the same issue with different subnets. We are not making any changes to the connection strings. Updated the settings(hostrecordttl and registerallprovidersip) of listener. But when failover happens the dns is not getting updated and we cannot connect to listener. Any suggestions?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search