Sql-server – SQL Server Cluster + Availability Groups

availability-groupshigh-availabilitysql serversql-server-2012

I'm actually finding a way to provide a good High Availability and Failover solution while I have a way to manage some sort of horizontal scalability and Load-Balancing…

I actually have a SQLServer Failover Cluster with 2 nodes (Active-Passive) but I wonder if could be possible to add more nodes to this cluster and configure some Database from the actual FailOver Cluster in AlwaysON Availability groups as read-only secondary copies.

And in the top of everything some sort of IP Load Balancer… I don't know if something like this could be possible.

Best Answer

You can have AGs within an FCI but I don't see the point (I mean when you do this you usually do away with the FCIs unless there was some specific requirement).

In an AG the listener acts similar to a load balancer - kind of. If applications support using application intent read only in the connection string it can offload reads to the "passive" server. It's not load balancing though as it only goes to one server. In 2016 those reads are round robin and so it works better.

If your apps don't support application intent and splitting reads and writes (very few do) though then you're largely out of luck. And you're not going to be able to load balance writes.

In your comment to me you mentioned you'd want to keep the FCI in order to balance load. That isn't really going to work that way with an AG and it would be wasteful of resources - which are one of the best parts of having an AG.

Let's say you have two nodes in an AG and ten databases. You can (if queries don't cross the databases, or only groups of them), create ten groups with a different name each. Then to do balancing you can failover just groups within the node to other nodes until you're happy with it. (Note though that you'll need to do scripting to do this; AGs don't have a notion of preferred nodes to go to automatically unlike FCIs).

As the nodes are "as" available as an FCI there's not many reasons to leave the FCI with its shared storage in place. Those resources are kind of wasted.