liveBook · Manning

Failover

As explained in Microsoft Azure in Action

Automatic failover is the automatic transfer of service operation to another region or component when the primary one becomes unavailable.

Failover keeps a service running by moving operation from an unavailable primary region or component to a ready secondary. In Azure, replicated data makes that handoff possible. section 10.5.1 section 11.4.2

Common Azure approaches include:

  • Active Geo-Replication provides up to four readable secondary databases, but failover is manual. section 10.5.1
  • Auto-failover groups automate the switch for Azure SQL databases and expose read-write and read-only listener endpoints. section 10.5.2
  • Cosmos DB uses multi-region deployment, failoverPriority, and optional multi-region writes to continue serving global applications. section 11.4.2

A regional outage

Banning Books replicates its ordering database to another Azure region. An automatic failover group can promote the synchronized secondary when the primary region fails, reducing downtime without requiring someone to intervene immediately. Planned failover can synchronize data first, minimizing loss. section 10.5.2

C:/> az sql failover-group create --name banningbooksfailovergroup 
--resource-group BanningRG --server BanningBooksServer 
--partner-server BanningBooksSecondaryServer --failover-policy Automatic 
--add-db BanningBooksDB

The Azure CLI example shows how to create a failover group, name both database servers, select an automatic policy, and attach a database. section 10.5.2

How Microsoft Azure in Action covers it

How deep it goes
Explains replication, automatic and manual policies, listeners, graceful switching, and regional priority, but does not detail application retry behavior.
Examples
Uses Banning Books database replicas, an Azure SQL failover-group command, and Alpaca-Ma-Bags Cosmos DB regions.
What it assumes
Assumes basic familiarity with Azure databases, regions, replication, and CLI resource configuration.
What you can do after
Operate/configure replicated Azure databases and Cosmos DB accounts with automatic or prioritized regional failover.
How it connects
Connects geo-replication, high availability, disaster recovery, multi-region deployment, read replicas, listener endpoints, and zone redundancy.

Also explained in

Compare how 6 books explain failover →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.