SQL Server AG Read Routing Fails Without a Primary-Side Routing List
A database engineer diagnosed early-morning dashboard timeouts caused by all read queries hitting an Always On Availability Group primary replica, while two healthy secondaries sat idle. The root cause was a commonly skipped second configuration step: although the secondaries were marked readable and the app used ApplicationIntent=ReadOnly, no read-only routing list had been defined on the primary replica. In SQL Server Always On AGs, the primary is responsible for redirecting read-intent connections to secondaries, and without a routing list it simply handles those connections itself. Administrators must use ALTER AVAILABILITY GROUP to set both the secondary READ_ONLY_ROUTING_URL and the primary PRIMARY_ROLE routing list, and must repeat the routing list definition on every replica since any node can become primary after a failover. SQL Server 2016 and later also support round-robin load balancing across multiple secondaries using nested parentheses syntax in the routing list.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in