Did you referred to below blog, it shows how to connect to Sec replica which is for Read only
End to End - Using a Listener to Connect to a Secondary Replica (Read-Only Routing)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Team,
How can I connect to an Async node using the Listener IP or Listener DNS in an Always on architecture (SQL Server 2016)??
Node1 - Primary
Node2 - Secondary (Sync)
Node3 - Secondary (Async)
Our API's connect to Node1 and Node2 using a DNS listener IP and some API's connect to Node3 via a direct TCP IP,Port
Did you referred to below blog, it shows how to connect to Sec replica which is for Read only
End to End - Using a Listener to Connect to a Secondary Replica (Read-Only Routing)
The built-in capabilities in SQL Server 2016 (and higher) load balancing of read-only routing will only function as a typical round-robin load balancing algorithm. If you want your other APIs to connect specifically to Node3, this has to be implemented on the network layer, filtering out the source connection (those coming from the other APIs) and redirecting them directly to Node3.
But you also need to modify your DR process in case Node3 becomes a primary replica.
Hi,
If the application's read operation cannot tolerate any degree of data lag, the read operation can only be run on the primary replica.
In SQL Server 2012 and 2014 versions, the read-only workload redirection process will redirect the queries specifically to the first secondary replica defined in the routing list, unless it was not accessible, and then it will direct the connection to the next replica in the routing list. SQL Server 2016 removes this limitation by introducing the native load balancing mechanism. More details please refer this article.
https://www.sqlshack.com/how-to-configure-read-only-routing-for-an-availability-group-in-sql-server-2016/