Design business continuity solutions · Topic 4 of 4

High Availability for Relational and Unstructured Data

AZ-305 data availability: zone redundant SQL and PostgreSQL, failover groups, Always On on VMs, Cosmos DB multi region, and storage ZRS and GZRS.

  • 5 min
In a nutshell
  • SQL zone redundancy gives RPO 0 inside the region. Failover groups give listener endpoints that do not change and cover regional failure.
  • PostgreSQL and MySQL flexible server offer zone redundant HA with a synchronous standby. SQL on VMs uses Always On.
  • Cosmos DB offers zones, multi region replication, service managed failover and multi region writes (not with strong consistency).

What it is

Data is usually the hardest part of high availability, because copies must stay consistent. Each data service has its own HA features: zone redundant configurations for failures inside a region, and geo replication or failover groups for regional failures. The architect chooses the feature that meets the RPO and RTO at an acceptable cost.

Zone failureinside the regionZone redundant tierRPO 0, fast recoveryRegional failuredisasterGeo replicationfailover group or multi region

How it works

Relational data

Azure SQL Database and Managed Instance

FeatureBehaviour
Local redundancyBuilt in: General Purpose uses remote storage and replaced compute, Business Critical and Premium use a replica cluster with automatic failover
Zone redundancyReplicas spread across availability zones. Available in the vCore tiers (General Purpose, Business Critical, Hyperscale) and DTU Premium. Recovery typically under about 30 seconds with an RPO of 0 inside the region. General Purpose carries an extra charge. All zone counts give the same SLA
Active geo replicationUp to four readable secondaries in any region, for single databases
Auto failover groupReplicates a set of databases to a secondary region with read write and read only listeners that do not change at failover. Asynchronous, so a small RPO
Read scale outBusiness Critical's included readable replica and Hyperscale named replicas offload reads

Secondary databases in a failover group are not zone redundant by default, but you can enable it. Combine zone redundancy (local) with a failover group (regional) for full coverage.

Azure Database for PostgreSQL and MySQL flexible server offer zone redundant high availability (a standby in another zone with synchronous replication and automatic failover) or same zone high availability, plus read replicas and cross region replicas for disaster recovery.

SQL Server on VMs uses Always On availability groups across zones (or an Always On failover cluster instance with shared storage), a load balancer or distributed network name for the listener, and a cloud witness for quorum. This gives control but needs more management, so prefer PaaS when possible.

Semi structured data (Cosmos DB)

  • Availability zones within a region, enabled per region.
  • Multi region replication: add read regions for low latency and disaster recovery. Service managed failover moves the write region automatically.
  • Multi region writes give active active behaviour with conflict resolution, but cannot be used with strong consistency.
  • SLAs: up to 99.999 percent for reads and writes in multi region accounts configured for it.
  • Consistency choice affects RPO: strong gives an RPO of zero in the replicated set, while weaker levels can lose a small recent window in a regional disaster. Bounded staleness limits the loss.

Unstructured data (Storage)

NeedRedundancy
Survive drive or rack failureLRS (11 nines durability)
Survive a zone failureZRS (12 nines)
Survive a regional disasterGRS (16 nines), failover to the secondary
Zone and regional resilienceGZRS
Read the secondary during an outageRA-GRS or RA-GZRS

Key points:

  • In GRS and GZRS the secondary is not readable unless there is a failover. RA variants allow reads.
  • Replication to the secondary is asynchronous, so there can be data loss. Check the last sync time and use customer managed failover when needed.
  • Managed disks support LRS and ZRS (zone redundant disks), and Azure Files SSD shares support LRS and ZRS only, while geo redundancy needs HDD shares.
  • Premium blob and files performance tiers have their own redundancy limits, so check them against the requirement.
  • Object replication can copy blobs between accounts for custom designs.

Composite design and testing

  • The database tier and compute tier should span the same zones, so a zone failure does not separate them.
  • Use connection retry logic with transient fault handling in apps. Failovers cause brief disconnections.
  • Test failovers regularly (SQL failover group forced failover, Cosmos manual failover, storage failover drills).
  • Keep backups in addition to replication, because replication copies mistakes.

Choosing quickly

RequirementAnswer
SQL Database must survive a zone loss with no data lossZone redundant configuration
One connection string that survives a regional failoverA failover group listener
PostgreSQL with automatic failover to another zoneZone redundant high availability
Cosmos DB writes in every regionMulti region writes, session or weaker consistency
Blob data must survive a datacenter loss in one regionZRS
Read blobs from the secondary during a regional outageRA-GZRS

A worked scenario

An online retailer's order system uses Azure SQL, Cosmos DB for the cart and Blob storage for product images, and needs to survive a zone loss with no data loss and a region loss within minutes. The architect configures zone redundant Business Critical SQL with a failover group to the paired region, Cosmos DB with zone redundancy, two regions and service managed failover, and an RA-GZRS storage account for images. Apps use retry logic, and the team runs a forced failover drill each quarter.

What to remember for the exam

  • SQL zone redundancy gives RPO 0 inside the region. Failover groups give listener endpoints that do not change and cover regional failure.
  • PostgreSQL and MySQL flexible server offer zone redundant HA with a synchronous standby. SQL on VMs uses Always On.
  • Cosmos DB offers zones, multi region replication, service managed failover and multi region writes (not with strong consistency).
  • ZRS survives a zone failure, GRS and GZRS survive a regional one, and RA variants allow secondary reads.
  • Replication is not backup. Keep both.
Exam tip

Combine zone redundancy for local failures with a failover group or geo replication for regional ones.

How the exam asks about this

  • "Apps must not change connection strings after failing over to another region." A failover group listener.
  • "No data loss if one datacenter in the region fails." Zone redundant configuration or ZRS.
  • "Read from a secondary copy during a regional outage." RA-GRS or RA-GZRS.
  • "Writes accepted in several regions." Cosmos DB multi region writes.

Common mistakes

Assuming GRS secondaries are readable. Use RA-GRS.

Zone redundant database but compute in one zone.

Relying on replication instead of backups.

Using strong consistency with multi region writes. It is not available.

Check yourself

  • What RPO does zone redundant SQL Database target inside a region?

    0.

  • Which storage option allows reads from the secondary region?

    RA-GRS or RA-GZRS.

  • What gives a stable endpoint across a SQL regional failover?

    An auto failover group listener.

Topic 4 of 4 in Design business continuity solutions

Test yourself on Design business continuity solutions

The full Microsoft AZ-305 question bank has 755 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.