Roadmap › Azure Databases — Azure SQL, Managed Instance, Cosmos DB, PostgreSQL and Migration › Module: Azure SQL
Lessons in this course (9)
4. High availability, geo-replication, failover groups and backups
Intermediate★ Must knowLesson 4 of 9
- Built-in HA: every database has an availability SLA (99.99 %; up to 99.995 % with zone redundancy on Business Critical/Premium). Replicas/standby compute handle hardware failures automatically — apps must retry transient errors during failovers.
- Zone redundancy: replicas spread across availability zones in the region.
- Active geo-replication: up to 4 readable secondaries in other regions (single database).
- Failover groups: group of databases replicated to another region with a listener endpoint (
shop-fg.database.windows.netread-write,shop-fg.secondary...read-only) — connection strings don't change after failover. - Backups: automatic full (weekly), differential (12–24 h) and log backups (every ~5–10 min); point-in-time restore (PITR) within the retention period (1–35 days); long-term retention (LTR) up to 10 years; geo-redundant backup storage for geo-restore.
- RPO/RTO: geo-replication gives RPO of seconds; PITR is for "oops, someone deleted data" (restores to a new database).
bash
az sql db restore --resource-group rg-shop --server shop-sql --name Shop --dest-name Shop_restored --time "2026-10-24T09:30:00Z"csharp
// EF Core: retry transient faults (failovers, throttling)
options.UseSqlServer(cs, sql => sql.EnableRetryOnFailure(maxRetryCount: 6, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null));