question

Vishu-2318 avatar image
0 Votes"
Vishu-2318 asked CarrinWu-MSFT answered

AlwaysOn Setup

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-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CarrinWu-MSFT avatar image
0 Votes"
CarrinWu-MSFT answered

Hi @Vishu-2318,

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JeffreyWilliams-3310 avatar image
0 Votes"
JeffreyWilliams-3310 answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Vishu-2318 avatar image
0 Votes"
Vishu-2318 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.