Sql-server – SQL Server 2016 AlwaysON

availability-groupssql server

I'm looking to setup a two physical node WFC cluster (server 2016) which has no shared disks. Performing standalone install of SQL server 2016 Standard on each of the nodes and then configuring a BAG on top of that.

In terms of quoroum Im going with node majority as there is no shared disk or witness configured.

Has anyone out there done the similar and is this bad practice? Am I required to give it a qouroum?

Also seems when you shut down SQL service on the primary node there isn't automatic failover… hmm… even though its set the sync commit and auto failover. Something isn't right

Also seems when you shut down SQL service on the primary node there isn't automatic failover… hmm… even though its set the sync commit and auto failover. Something isn't right
From testing it appears if one node goes down then the AV resource just fails over to the other node. Just wondering whether we would have splitbrain scenario as using node majority?

Thoughts?

Best Answer

You have a two-node setup and no witness, meaning there would be only two votes in the quorum. This is why you cannot use automated failover currently--there aren't enough votes, and as such, the remaining node cannot get quorum when the other node is offline.

There are two problems with this setup.


Split Brain

If a network outage occurs, the two nodes can no longer communicate, so without a third vote (file share or disk witness), neither node has a way of knowing which cluster resources the other node has online. Accordingly, the resources will be taken offline to avoid a "split brain," which is a term used to describe a situation where multiple nodes have the same resource(s) online.


Quorum

In order for a cluster to be considered healthy and online, over 50% of votes must be cast. In this scenario the moment one node goes offline, the cluster will go offline. With only two votes available, each vote is worth 50%, so if one node is down or they cannot communicate, neither node can get more than 50%.


Enter the Witness

For the above reasons, you need to utilise a witness (fileshare or disk) to ensure that over 50% of votes are cast when one node goes down, and the cluster remains healthy and online.

In your specific scenario you would need to utilise a file share witness or Azure witness, due to a lack of shared disks in the cluster.

If you are using Windows Server 2012 R2 and SQL 2012, you could also consider using Dynamic Witness rather than a witness.