AG-Read only replicas

  • We are planning to have read only replicas in our environment. Current setup holds one pair of synchronous nodes in same data center and other node asynchronous commit in different data center. We would like to use all three nodes as read only. Is this possible?

  • As far as I'm aware, you can have up to 4 secondary replicas in SQL 2012 and up to 8 in SQL 2014. So you should not have a problem with setting up 3 secondary read only replicas in your environment.

    Overview of Always On - http://msdn.microsoft.com/en-us/library/ff877884(v=sql.110).aspx

    Andrew

  • Thanks Andrew. What i am looking for is how to balnce these read only connections between one read write, two read only nodes. all the writes will be hitting the read write node. when it comes to reads how the traffic gets diverted between three nodes. also we are planning to introduce load balancer to manage the read traffic. but in Ag the listener checks for synchronous read only replicas and diverts the read only traffic. the other replica is set for asnchronous commit. how the read traffic will get forwarded to this node?

  • This link should give you some information about diverting read only traffic:-

    http://msdn.microsoft.com/en-us/library/hh710054.aspx#RORReplicaProperties

    However if you want to split the traffic between read only replicas, I'm honestly not too sure.

  • Andrew,

    Is there anyway you can help me out in figuring how this read only routing is made. As far as my knowledge goes, client connections connect to listener and from there connects to primary. But if the applicationintent is equal to readonly then they will be diverted to readable secondary replicas. So the read only client connections will have to connect to primary then diverted to secondary? Am I right?

  • We've been using config like this for a few years. Besides the the primary we have one sync nonreadable replica for HA, one async readable replica for reporting and one more async nonreadable replica for DR.

    We had some initial difficulty pushing out the connection string change for applicationintent (older clients), so we just have a DNS entry that gets users/apps to the SQL instance with the readable replica.

    FWIW, we're in process of moving back to FCIs for HA--using AGs for HA has not been great experience. Might want to consider this if you're not too far down that path. We still are big fans of using AGs for the readable replica capability and DR, just not for HA.

Viewing 6 posts - 1 through 5 (of 5 total)

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