
What Always On Availability Groups actually protect
An Availability Group (AG) is a logical container that groups one or more user databases so they fail over together. The unit of failover is the AG, not the individual database, which is what makes AGs the right high-availability primitive for applications that depend on a set of related databases staying consistent. Each database in the AG is maintained as an independent copy on every secondary replica, with its own redo stream, so a corruption or load problem on one copy does not propagate to the others.
It is important to understand what an AG is not. An AG is not a substitute for backups — it protects against server and storage failure, not against accidental DELETE statements or logical corruption, because those are replicated to every secondary. It is also not a cluster-shared-disk solution: every replica holds its own copy of the database files, so storage is replicated, not shared. Pairing AGs with a tested backup and restore strategy is what gives you both availability and recoverability.
Synchronous versus asynchronous commit: the RPO decision
The availability mode of each secondary replica is the single most important design decision, because it determines your Recovery Point Objective (RPO). A synchronous-commit secondary acknowledges a transaction only after the log block is hardened to disk on the secondary, giving an RPO of zero for committed transactions — at the cost of added commit latency equal to the round-trip plus the secondary's write time. An asynchronous-commit secondary does not wait, so it removes the latency cost but accepts a small RPO if the primary fails before the last log blocks are shipped.
The practical guidance is to use synchronous commit for a secondary within the same data centre (low latency, fast storage), and asynchronous commit for a secondary in a remote data centre where the network round-trip would make synchronous commit unacceptable for the workload. A common three-replica topology is one synchronous secondary in the primary data centre (for automatic failover) and one asynchronous secondary in a DR data centre (for disaster recovery). This gives both RPO=0 high availability within a site and a DR copy across sites.
| Mode | RPO | Automatic failover | Typical use |
|---|---|---|---|
| Synchronous commit | Zero (for committed txn) | Yes (with AUTOMATIC mode) | Same-data-centre HA secondary |
| Asynchronous commit | Small (unsent log on failover) | No | Cross-data-centre DR secondary |
| Synchronous + manual failover | Zero | No | Readable secondary you fail to deliberately |
Quorum and the witness: why two nodes is not enough
An AG sits on top of a Windows Server Failover Cluster (WSFC), and the cluster's quorum model decides whether a node is allowed to host the AG. Quorum is a voting majority: if a partitioned set of cluster nodes cannot reach a quorum of votes, they stop hosting the AG to prevent split-brain. A two-node cluster with no witness has no majority when one node fails (one vote out of two is not a majority), so the surviving node drops the AG — even though a healthy database copy exists on it.
The fix is always to configure a witness for a two-node cluster. A file-share witness or a cloud witness provides the third vote that lets a single surviving node maintain quorum. For multi-site clusters, place the witness in a third, independent location so a site partition cannot leave both sites believing they own the AG. The cloud witness (an Azure Storage blob) is the modern default because it requires no extra VM and is reachable from every site.
- Always configure a witness for any two-node AG cluster — a single node cannot hold quorum alone
- Prefer a cloud witness (Azure blob) for multi-site clusters; it needs no extra infrastructure
- Use Node Majority quorum for clusters with an odd number of voting nodes
- Monitor quorum state as part of AG health, not only at failover time
Designing the failover policy and testing it
Automatic failover only fires when three conditions are met simultaneously: the failing primary is in synchronous-commit mode, the target secondary's failover mode is set to AUTOMATIC, and that secondary is in a HEALTHY synchronized state at the moment of failure. If any condition is unmet — for example the secondary drifted to NOT SYNCHRONIZED minutes before the failure — SQL Server will not fail over automatically, and you are forced into a manual failover that may lose data.
This is why an untested failover plan is a liability. The failover policy must be drilled in a maintenance window on a regular schedule: force a manual failover to the synchronous secondary, verify applications reconnect, and verify the original primary can be brought back as a secondary without re-seeding. A failover that has never been tested will fail in ways you cannot predict during a real incident, usually at the worst possible moment.
-- On the secondary that will become primary:
ALTER AVAILABILITY GROUP [AG-Prod] SET HADR LOCAL;
-- Verify the new primary and synchronization health:
SELECT rs.replica_server_name, rs.role_desc, rs.operational_state_desc,
rs.synchronization_health_desc
FROM sys.dm_hadr_availability_replica_states rs;Written by
Jamshed Alam
Global MSP & IT Infrastructure Consultant with 20 years across Exchange, Microsoft 365, Azure, security and automation. Available for project and contract work worldwide.