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
Which storage redundancy option lets an application read data from the secondary region without waiting for any failover?
- GZRS
- ZRS
- RA-GZRS
- 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.
Which statements about storage account failover are correct?
- After an unplanned failover, writes newer than the Last Sync Time can be lost
- After an unplanned failover the account becomes locally redundant (LRS)
- An unplanned failover keeps geo-redundancy without further action
- A planned failover suits DR testing without expected data loss
- 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.
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.
