I'm looking at AlwaysOn availability groups. The more I look at it the more it appears that the availability listener group is a single point of failure. Where exactly does the listener actually run? A separate a server, the primary SQL server, all of them?

Say I have a whole application stack at my second data center. How do I configure the listener(s) such that they will be running at both sites and that the applications will point to their own local copies?

I'm sure I'm missing something here but I don't know what.


The AG listener is a virtual network name (VNN) or virtual IP (VIP).

An availability group listener is a virtual network name (VNN) to which clients can connect in order to access a database in a primary or secondary replica of an AlwaysOn availability group.

You point applications to the listener (which is registered with DNS) and directs traffic in the AG. So, unless all your DCs go down at the same time, your redundancy is the number of DCs/DNS servers.

An availability group listener consists of a Domain Name System (DNS) listener name, listener port designation, and one or more IP addresses. Only the TCP protocol is supported by availability group listener. The DNS name of the listener must also be unique in the domain and in NetBIOS. When you create a new availability group listener it becomes a resource in a cluster with an associated virtual network name (VNN), virtual IP (VIP), and availability group dependency. A client uses DNS to resolve the VNN into multiple IP addresses and then tries to connect to each address, until a connection request succeeds or until the connection requests time out.

This MSDN article (which i quoted from) should be a good starting point for what, exactly, an AG Listener is.


| improve this answer | |
  • Thanks Kris. For some reason I was under the impression that the DNS entry pointed to the availability group, not that it actually is acting as it. No matter how many times I read that document it didn't come across. Effectively as long as I have a DC at my second datacenter I'll be fine. – Tim Brigham Dec 31 '15 at 19:17
  • 1
    Thanks, Kris. What is the purpose of having these listener IPs? Possible to explain that in layman terms – Manivannan Nagarajan Sep 22 '17 at 1:24
  • 3
    It's a consistent connection point for applications and services. With technologies like mirroring, you have to specify the secondary server in your connection string should the primary not be available. With the listener, the name never changes, just the primary changes underneath it. So when you fail over, the process is seamless and transparent (mostly) to the application. – Kris Gruttemeyer Sep 22 '17 at 1:28
  • whats the diffence between that and cluster ip? – Edgar Allan Bayron Jun 26 '19 at 14:48
  • 2
    @EdgarAllanBayron - The cluster IP is an internal IP used by the WSFC itself. The listener IP is a different IP that allows connectivity to SQL Server. They are 2 separate IPs. – Kris Gruttemeyer Jun 26 '19 at 14:52

The listener is a failover resource within the WSFC the AG is built upon. It will follow the primary replica as it fails over so there is some redundancy in that portion for it. As mentioned the DNS side is based on your AD infrastructure and DNS uptime.

In your example of the secondary data center you will want to configure the WSFC as a multi-subnet configuration, allowing your listener to hold an IP in both subnets for data centers. If the AG fails over to the secondary DC then your listener will become active under that subnet. Your applicatoins will only see downtime for the IP to come online in that secondary DC, and then the replica switch over as well.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.