A question Regarding SQL SERVER 2017 read and write routing to secondary replica.

  • HI All,

    I have a question regarding Alwayson primary and secondary replica and if/how can I load balance the read and write coming from a single application? Not really sure if this is possible and looking for Guidance in to this.

    I know in AlwaysOn you can off load read only like reporting and SSIS data extraction like from SSIS packages.

    But is it possible to load balance connection coming from a single application? the read queries goes to secondary replica and write quires from the same application goes to primary replica. to load balance loading coming from a single application.

    Pls let me know.

    Regards,
    AB

  • BoobyB - Sunday, September 16, 2018 9:10 AM

    HI All,

    I have a question regarding Alwayson primary and secondary replica and if/how can I load balance the read and write coming from a single application? Not really sure if this is possible and looking for Guidance in to this.

    I know in AlwaysOn you can off load read only like reporting and SSIS data extraction like from SSIS packages.

    But is it possible to load balance connection coming from a single application? the read queries goes to secondary replica and write quires from the same application goes to primary replica. to load balance loading coming from a single application.

    Pls let me know.

    Regards,
    AB

    You would need to handle that at the application level as the application would know what is read only. The application can use different connection strings for different activities and can connect to the read only secondary adding ApplicationIntent=ReadOnly to the connection string.

    Sue

  • To add to that, the read intent only connections are handled via round robin method so if you have multiple readable secondaries, it will distribute them in that fashion to each replica.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply