Share via

AlwaysOn Setup

Vishal Garg 1,576 Reputation points
2021-06-22T14:36:12.41+00:00

Experts ,

If I create a Always On Instance with read only replica , will it be using a common listener. How will the requests be routed based on the fact if it is an update or a read only request. Any changes required at the application end or will all applications support by default , this setup

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

Answer accepted by question author

CarrinWu-MSFT 6,891 Reputation points
2021-06-23T05:51:14.94+00:00

Hi @Vishal Garg ,

Welcome to Microsoft Q&A!

Please refer to Offload read-only workload to secondary replica of an Always On availability group:

To support read-only routing, an availability group must possess an availability group listener. The read-only client must direct its connection requests to this listener, and the client's connection string must specify the application intent as "read-only." That is, they must be read-intent connection requests.

Best regards,
Carrin


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Vishal Garg 1,576 Reputation points
    2021-06-23T03:15:55.963+00:00

    Intent is to offload reads.

    connection needs to include the ApplicationIntent setting -> does it need to be marked in the application connection string or somewhere in the AlwaysOn Setup

    Was this answer helpful?

    0 comments No comments

  2. Jeffrey Williams 1,901 Reputation points
    2021-06-22T19:11:28.557+00:00

    Is that secondary set to read-only or read-intent? What is the purpose of the secondary - is it for reporting only or is their an intent to offload reads? If the intent is to offload your reads - is that something you have researched and verified is actually needed for the application?

    In order for reads to be offloaded - the connection needs to include the ApplicationIntent setting. If the connection hasn't been updated then the secondary will not be utilized to redirect reads to the secondary.

    Was this answer helpful?

    0 comments No comments

Your answer

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