1

Is it possible to configure a generic Windows service in a Windows Server Failover Cluster such that the service always runs on the same machine as the Primary Replica (read/write) of an SQL Server AlwaysOn Availability Group? How would this be achieved?

The objective is to ensure that a .NET application which runs as a service always connects to the read/write database instance in the Availability Group without introducing any additional latency from the network. It is desired to avoid scenarios where the service is running on one node of the cluster while the Primary Replica is hosted on a different node.

I suppose it would also be necessary to ensure that the Availability Group Listener runs on the same machine as the Primary Replica (to ensure that queries from the service aren't routed out to the AG listener and then back to the primary replica, thus incurring network roundtrips). I believe no special configuration would be required for this because the AG Listener is part of the WSFC resources belonging to the AlwaysOn AG, and would therefore run on the AG cluster's active node, which I presume also hosts the AG's Primary Replica.

Hydrargyrum
  • 111
  • 4

0 Answers0