Bitzu

AZ-305 ยท High availability design

High availability for Cosmos DB and Azure Storage

Cosmos DB multi-region reads and writes, service-managed vs manual failover, storage account failover with GRS/GZRS, RA-GRS for read availability.

Key points

  • Cosmos DB single write region: on failure, take the region offline (forced failover) or wait for service-managed failover (1+ hour).
  • Multi-region writes: no expected downtime, no strong consistency, conflicts to resolve.
  • RA-GRS/RA-GZRS: read the secondary any time; GRS/GZRS only after failover.
  • Account failover: planned (no loss), unplanned (data after Last Sync Time lost; becomes LRS), Microsoft-managed (do not rely).

Source: https://learn.microsoft.com/en-us/azure/reliability/reliability-cosmos-db

Practice questions

Single choice

Which storage redundancy option lets an application read data from the secondary region without waiting for any failover?

  1. GZRS
  2. ZRS
  3. RA-GZRS
  4. LRS
Show answer

Answer: C. RA-GZRS

RA-GZRS (like RA-GRS) adds read access to the secondary endpoint at all times. GZRS replicates to the secondary region but you can only use that copy after a failover; ZRS and LRS keep data in the primary region only.

Select all that apply

Which statements about storage account failover are correct?

  1. After an unplanned failover, writes newer than the Last Sync Time can be lost
  2. After an unplanned failover the account becomes locally redundant (LRS)
  3. An unplanned failover keeps geo-redundancy without further action
  4. A planned failover suits DR testing without expected data loss
  5. Accounts holding premium block blobs support customer-managed failover
Show answer

Answer: A. After an unplanned failover, writes newer than the Last Sync Time can be lost, B. After an unplanned failover the account becomes locally redundant (LRS), D. A planned failover suits DR testing without expected data loss

In an unplanned customer-managed failover, writes made after the Last Sync Time may be lost and the account ends up as LRS in the new primary region. A customer-managed planned failover is meant for DR testing and does not lose data while both regions are available. Geo-redundancy is not retained after an unplanned failover (you must re-enable it and pay for re-replication), and accounts with premium block blobs cannot be failed over.

True or false

For a single-write Cosmos DB account with service-managed failover enabled, taking the failed write region offline yourself can restore write availability faster than waiting for the service to fail over.

Show answer

Answer: True

True. Declaring an outage and triggering service-managed failover can take an hour or more, so Microsoft advises a forced failover (taking the region offline) when you need writes back quickly.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-305 topics in this module