Sql-server – How to configure a 4-node AlwaysOn cluster to have two listeners

availability-groupshadrlistenersql-server-2017windows-server

Looking to build a 4-node (servers A, B, C & D) AlwaysOn Windows 2016 failover cluster with 2 nodes in the primary datacenter for HA, and 2 other replica nodes in the DR datacenter for disaster/reporting purposes.

Since this is a multisite cluster, is there a way to configure to have two listeners (one for the Production/primary instance, the other for the DR instance) under the one AlwaysOn Availability Group.

Also, would SQL on all four nodes need to run under the same service account? Or can servers A, B be on one account while servers C, D run under another account.

Is this even feasible/possible? Thank you in advance for your help!! Hope everyone is safe & well during this time.

Best Answer

is there a way to configure to have two listeners

Sort of, but it's unusual. The more normal practice is to have a single AG Listener, with read-only routing configured. That way everyone connects to the same hostname, but read-only workloads will disconnect and reconnect directly to an available readable replica.

would SQL on all four nodes need to run under the same service account?

It's recommended, but not required, to use a single Group Managed Service Account for all the nodes. If the instances have different service accounts, Kerberos won't work when connecting to the AG Listener.