Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

AlwaysOn Availability Group and .Net - splitting read and writes

$
0
0

Hey everybody,

So I finally was able to take a good look at AGs, and sadly, an Active/Active (Rw/Rw) setup is not possible, as only the primary replica is able to write and the others can be enabled to read. I was looking at it to have 2 sites in Active/Active (Rw/Rw) mode. Not being able to do it ain't a big deal as we can achieve this through other means.

Now I do however have a question, considering that we are running some applications that sometimes splits read and and writes and sometimes does not. Will AG automatically do the read only queries on the nearest server ? Or is there a way to tell the connection or the command in SQL server to use the nearest READ allowed replica ? One way to achieve this would be to have 2 "connections" in the .Net application, one for reads and one for writes. 

Is this possible, and if so can you point me to any resource on how to configure such a behavior ?

And while I am at it:

* AG use n times the space that the primary uses. Is their a point at having 2 replicas per site and doing the backup on both site? Or only one site would be enough if Site 1 has primary + secondary and Site 2 has secondary + backup for instance.

* Is their a way to make it so that a secondary replica replicates out of another secondary replica ?

* And what if we were to use distributed transactions that do read and writes in the same section ? Can the system do the read on the nearest server and the writes on the primary ?

Have a good day!



Viewing all articles
Browse latest Browse all 4689

Trending Articles