Designing for high availability
Keep compute, relational and non-relational data running through hardware, zone and region failures, and calculate the combined SLA.
In this lesson you'll learn
- Availability options for compute and their SLAs
- Composite SLAs: how dependencies reduce availability
- High availability for Azure SQL
- High availability for storage and Cosmos DB
1. Compute
Refresher: zones, sets and regions
An availability set spreads VMs across racks in one datacentre. Availability zones are separate datacentres in one region. A second region protects against a whole-region outage.
| Design | Protects against | VM SLA |
|---|---|---|
| Single VM with Premium SSD | Nothing beyond the host | 99.9% |
| Availability set (2+ VMs) | Rack and maintenance failures | 99.95% |
| Availability zones (2+ VMs) | A datacentre failure | 99.99% |
| Two regions behind Front Door or Traffic Manager | A region failure | Higher, depending on design |
For PaaS, choose zone-redundant options where they exist: zone-redundant App Service plans, Container Apps environments, AKS node pools across zones, and zone-redundant gateways.
2. Composite SLAs
When services depend on each other, multiply their SLAs. A web app (99.95%) that depends on a database (99.99%) has a composite SLA of 99.95% × 99.99% ≈ 99.94%, lower than either.
Example: adding a second region
- One region gives web app × database = 99.94%.
- A second, independent region gives the same 99.94%.
- The chance both fail at once is 0.06% × 0.06% = 0.000036%.
- So two active regions together give about 99.99996%, before counting the global load balancer in front.
3. Relational data
| Need | Recommend |
|---|---|
| Survive a zone failure in one region | Zone-redundant configuration (General Purpose, Business Critical or Hyperscale) |
| Fastest failover with local replicas | Business Critical (Always On replicas built in) |
| Survive a region failure | Failover group to a secondary region |
| SQL Server on VMs | Always On availability group across zones, with a load balancer listener |
4. Semi-structured and unstructured data
- Cosmos DB: enable availability zones in each region, add regions for reads, and use multi-region writes for the highest availability (up to 99.999% for reads and writes).
- Storage: ZRS for zone failures, GZRS or RA-GZRS for zone plus region, with read access to the secondary if the app must read during an outage.
Example
An online booking service needs to stay up through a datacentre failure, and to keep accepting bookings even if a region fails. The architect recommends zone-redundant App Service plans in two regions behind Azure Front Door, Cosmos DB with multi-region writes for bookings, and RA-GZRS for uploaded documents.
Exam traps to remember
- Adding a dependency always lowers the composite SLA. Adding redundant copies raises it.
- Availability sets don't protect against a datacentre failure, but zones do.
- Zone redundancy is a setting on many PaaS services. Look for it before adding a second region.
Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-305 Azure Solutions Architect app.
Practise in the app