SQL Server Always On Listener IP for Async Nodes??

Ashif Shaikh 156 Reputation points
2020-09-02T13:18:44.733+00:00

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

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,961 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Shashank Singh 6,251 Reputation points
    2020-09-02T13:33:52.11+00:00

    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)


  2. Edwin M Sarmiento 256 Reputation points
    2020-09-02T22:05:19.91+00:00

    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.


  3. Cris Zhan-MSFT 6,631 Reputation points
    2020-09-03T10:08:45.59+00:00

    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/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.