Sunday, 29 January 2017

Clusters, listeners, always on, VNNs, VCO, WSFC, AGLs, VIPs, WTF? How does all this stuff fit together?

I put together some notes on Clusters, listeners, always on etc just to clear things up in my own mind:


The cluster name object (CNO) is an Active Directory computer object linked with the network resource Cluster Name (the Windows Cluster)

The Availability Group Listeners are registered as Cluster Resources - and in Active Directory as Virtual Computer Objects (VCOs)

The cluster name account requires the "Create Computer objects" permission when you create a clustered service or an application. When the cluster name account does not have
this permission, SQL Server cannot create the availability group listener

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

Listeners are registered as Cluster Resources
  
This is how The Listener is related to the cluster – it is registered as a cluster resource when it is created
  
The listener leverages the Windows Failover Cluster (WSFC) for its functionality; you cannot create the listener without the cluster already existing as the cluster itself creates the listener. As such, it is Active Directory (AD) that hosts it and the nodes that use the cluster can use any services that cluster has, in this case the listener.

Essentially someone creates the cluster, and if there are proper AD permissions then it creates the Availability Group (AG) within the cluster, and then the listener within the AG when those are created

The Availability Group Listener (AGL) is part of the AG's Windows Server Failover Cluster (WSFC) Resource. It is a Virtual Network Name with n number of IP addresses. Being in a cluster resource it will only run on a single node of the WSFC and that node will be the primary node of the AG. It is not a thread within SQL Server. The WSFC handles the failover of the AG resource and the AG databases will not come online without the AG resource residing on its node of the WSFC.
The listener just handles connection forwarding. When connecting to the read/write replica the connection will hit the listener and then the listener will tell the client to connect to the primary replica's IP address. In the case of read-only routing it will follow the below work flow

No comments:

Post a Comment