Reading30 min read·Module 2High exam weight

Multi-AZ Deployments

Key concepts

  • AZ failure isolation

  • RDS Multi-AZ failover

  • ELB cross-zone load balancing

  • Auto Scaling across AZs

  • Synchronous vs asynchronous replication

Overview

Multi-AZ (Availability Zone) deployments are a fundamental high availability pattern in AWS that distributes resources across multiple physically separated data centers within a single AWS Region. Each Availability Zone has independent power, cooling, and networking, connected through low-latency links.

For the SAA-C03 exam, understanding Multi-AZ deployments is critical as it appears in questions about designing resilient architectures (26% of the exam). You need to know which services support Multi-AZ, how failover works, and when to use Multi-AZ versus Multi-Region architectures.

Core Principle

Multi-AZ provides high availability within a single Region by protecting against AZ-level failures. It uses synchronous or semi-synchronous replication to maintain data consistency and enables automatic failover with minimal downtime.

Exam Tip

Multi-AZ questions often ask about failover times, replication types (sync vs async), and whether standby instances can serve read traffic. Know the differences between RDS Multi-AZ Instance, Multi-AZ Cluster, and Aurora.


Architecture Diagram

The following diagram illustrates a typical Multi-AZ architecture with various AWS services:

Multi-AZ Architecture Overview
Figure 1: Multi-AZ deployment pattern showing EC2, RDS, NAT Gateway, and ELB distributed across Availability Zones

Key Concepts

Availability Zones

Availability Zones (AZs)

An Availability Zone is one or more discrete data centers with redundant power, networking, and connectivity in an AWS Region.

Key Characteristics:

  • Each Region has a minimum of 3 AZs (most have 3-6)
  • AZs are connected with high-bandwidth, low-latency networking
  • Physical separation provides fault isolation
  • AZ names are mapped differently per account (us-east-1a in your account may be different physical location than in another account)
  • AZ IDs (e.g., use1-az1) are consistent across accounts

Distance & Latency:

  • AZs are physically separated by a meaningful distance (many kilometers)
  • Connected via dedicated metro fiber providing single-digit millisecond latency
  • Far enough apart to reduce correlated failure risk

Multi-AZ Design Principles

Multi-AZ Design Principles

When designing Multi-AZ architectures, follow these core principles:

1. Eliminate Single Points of Failure

  • Deploy resources in at least 2 AZs (preferably 3)
  • Use managed services with built-in Multi-AZ support
  • Design for AZ independence (each AZ can operate standalone)

2. Plan for Capacity

  • 2 AZ deployment: Provision 200% capacity (each AZ handles 100%)
  • 3 AZ deployment: Provision 150% capacity (each AZ handles 50%)
  • Account for failover traffic redistribution

3. Use Appropriate Replication

  • Synchronous replication for zero data loss (higher latency)
  • Asynchronous replication for better performance (potential data loss)

How It Works

RDS Multi-AZ Deployments

Amazon RDS offers two Multi-AZ deployment options with different characteristics:

RDS Multi-AZ Deployment Options
Figure 2: Comparison of RDS Multi-AZ Instance vs Multi-AZ Cluster deployments

RDS Multi-AZ Deployment Options

FeatureMulti-AZ InstanceMulti-AZ Cluster
Standby Instances1 (not readable)2 (readable)
ReplicationSynchronousSemi-synchronous
Failover Time60-120 secondsUnder 35 seconds
Read ScalingNoYes (2 readers)
Commit LatencyStandardUp to 2x faster
Supported EnginesAll RDS enginesMySQL 8.0.28+, PostgreSQL 13.4+
StorageEBS onlyLocal NVMe + EBS

Multi-AZ Instance Deployment

TEXTRDS Multi-AZ Instance - How It Works
1. Primary DB instance handles all read/write operations
2. Synchronous replication to standby in different AZ
3. Standby is NOT accessible (no read traffic)
4. On failure: Automatic DNS failover to standby
5. Failover completes in 60-120 seconds
6. No data loss due to synchronous replication

Multi-AZ Cluster Deployment

TEXTRDS Multi-AZ Cluster - How It Works
1. Writer instance handles write operations
2. Two reader instances in different AZs
3. Semi-synchronous replication (1 reader must acknowledge)
4. Readers can serve read traffic (offload reads)
5. Uses local NVMe SSD for faster commits
6. Failover typically under 35 seconds
7. Endpoints: Writer, Reader, and Instance endpoints

Aurora Multi-AZ

Amazon Aurora has a unique architecture that provides Multi-AZ by default:

Aurora Multi-AZ Architecture
Figure 3: Aurora cluster with writer and reader instances across Availability Zones

Aurora Multi-AZ Architecture

Aurora separates compute from storage, providing inherent Multi-AZ durability:

Storage Layer:

  • Data automatically replicated 6 ways across 3 AZs
  • Can lose 2 copies and still write
  • Can lose 3 copies and still read
  • Self-healing storage with continuous backup to S3

Compute Layer:

  • Primary (writer) instance in one AZ
  • Up to 15 Aurora Replicas across AZs
  • Replicas can serve read traffic
  • Failover to replica in under 30 seconds
  • Failover priority tiers (0-15) control promotion order
Aurora vs RDS Multi-AZ

Aurora's storage replication is automatic and always Multi-AZ. The compute layer (instances) benefits from placing replicas in different AZs for compute-level failover. Aurora provides faster failover (under 30 seconds) compared to RDS Multi-AZ.

Elastic Load Balancing Multi-AZ

ELB Cross-Zone Load Balancing
Figure 4: Cross-zone load balancing distributing traffic across targets in multiple AZs

Load Balancer Cross-Zone Defaults

Load Balancer TypeCross-Zone DefaultCost for Cross-AZ Traffic
Application Load Balancer (ALB)EnabledNo charge
Network Load Balancer (NLB)DisabledCharges apply
Gateway Load Balancer (GWLB)DisabledCharges apply
Classic Load Balancer (CLB)Disabled (Console: Enabled)No charge

Cross-Zone Load Balancing

With Cross-Zone Enabled:

  • Each LB node distributes traffic across ALL targets in ALL AZs
  • Even distribution regardless of target count per AZ
  • Better utilization, but prevents Availability Zone Independence

With Cross-Zone Disabled:

  • Each LB node only routes to targets in its own AZ
  • Uneven distribution if targets are imbalanced
  • Enables Availability Zone Independence (AZI)
  • Required for zonal shift/evacuation strategies

NAT Gateway Multi-AZ

NAT Gateway High Availability

NAT Gateways are AZ-scoped resources - each operates within a single AZ.

Best Practice Architecture:

  • Deploy one NAT Gateway per AZ where you have private subnets
  • Update route tables so each private subnet uses its local NAT Gateway
  • Prevents cross-AZ traffic and avoids single point of failure

Why This Matters:

  • If using a single NAT Gateway and its AZ fails, private resources in other AZs lose internet access
  • Cross-AZ NAT traffic incurs data transfer charges
  • AZ-local NAT Gateway provides fault isolation
NAT Gateway Multi-AZ Architecture
Figure 5: NAT Gateway deployed in each AZ for high availability and cost optimization

ElastiCache Multi-AZ

ElastiCache Multi-AZ with Auto-Failover

ElastiCache for Redis supports Multi-AZ with automatic failover:

How It Works:

  1. Primary node handles reads and writes
  2. Read replicas in different AZs receive asynchronous updates
  3. On primary failure, ElastiCache promotes replica with lowest replication lag
  4. DNS update propagates (application reconnects automatically)
  5. New replica created to maintain redundancy

Failover Triggers:

  • Primary node failure
  • Primary AZ network connectivity loss
  • Primary AZ availability loss

Key Points:

  • Memcached does NOT support Multi-AZ replication
  • Redis cluster mode works with Multi-AZ
  • Replicas should be in different AZs than primary

Use Cases

Use Case 1: High Availability Web Application

Scenario: E-commerce application requiring 99.99% availability

Solution:

  • ALB distributing traffic across 3 AZs
  • EC2 instances in Auto Scaling Group spanning 3 AZs
  • RDS Multi-AZ Cluster (MySQL) for database
  • ElastiCache Redis with Multi-AZ for session storage
  • NAT Gateway in each AZ for private subnet internet access

Use Case 2: Regulatory Compliance with Zero Data Loss

Scenario: Financial application requiring zero data loss on failover

Solution:

  • RDS Multi-AZ Instance deployment (synchronous replication)
  • Primary and standby in different AZs
  • Automatic failover maintains data consistency
  • Point-in-time recovery for additional protection

Use Case 3: Read-Heavy Application with HA

Scenario: Analytics dashboard with heavy read workload needing high availability

Solution:

  • Aurora MySQL with 1 writer + 3 reader instances
  • Readers distributed across 3 AZs
  • Reader endpoint for read traffic distribution
  • Failover priority configured (tier 0 for preferred failover target)
  • Under 30-second failover if writer fails

Decision Guide

Use this decision tree to choose the right database high availability solution:


Best Practices

Multi-AZ Best Practices
  1. Use at least 3 AZs for production workloads (better capacity efficiency: 150% vs 200%)
  2. Deploy NAT Gateways per AZ to avoid cross-AZ dependencies and reduce costs
  3. Enable Multi-AZ for all stateful services (RDS, ElastiCache, EFS)
  4. Test failover regularly using AWS Fault Injection Simulator (FIS)
  5. Configure health checks properly on load balancers for quick failure detection
  6. Use connection pooling/RDS Proxy to reduce failover impact on applications
  7. Set appropriate failover priority for Aurora replicas based on instance capability

Common Exam Scenarios

Exam Scenarios and Solutions

ScenarioSolutionWhy
Web app needs HA with zero data loss on DB failoverRDS Multi-AZ InstanceSynchronous replication ensures zero data loss; automatic failover
Database needs HA + read scalingRDS Multi-AZ Cluster or AuroraReadable standbys offload read traffic while maintaining HA
Private subnets lose internet when one AZ failsDeploy NAT Gateway in each AZAZ-scoped NAT prevents cross-AZ dependency failure
Need fastest possible database failoverAurora with Multi-AZ replicasAurora failover typically under 30 seconds vs 60-120 for RDS
Application needs HA caching layerElastiCache Redis with Multi-AZAuto-failover promotes replica; Memcached does not support replication
Load balancer uneven distribution after AZ failureEnable cross-zone load balancingDistributes traffic evenly across all healthy targets
Need AZ evacuation capabilityDisable cross-zone load balancing + use zonal shiftAZ Independence allows shifting away from impaired AZ

Common Pitfalls

Pitfall 1: Single NAT Gateway for Multiple AZs

Mistake: Using one NAT Gateway to serve private subnets in multiple AZs.

Why it fails:

  • Creates single point of failure
  • If the NAT Gateway's AZ fails, all other AZs lose internet connectivity
  • Cross-AZ data transfer charges accumulate

Correct Approach:

  • Deploy one NAT Gateway per AZ
  • Configure route tables so each subnet uses local NAT Gateway
  • Provides both fault tolerance and cost optimization
Pitfall 2: Confusing Multi-AZ with Read Replicas

Mistake: Expecting RDS Multi-AZ standby to serve read traffic.

Why it fails:

  • RDS Multi-AZ Instance standby is for failover only, not readable
  • This is different from Read Replicas which serve read traffic

Correct Approach:

  • For HA only: Use Multi-AZ Instance
  • For HA + read scaling: Use Multi-AZ Cluster or Aurora with replicas
  • For read scaling without HA: Use Read Replicas (async, can be cross-region)
Pitfall 3: Assuming Multi-AZ Protects Against Region Failure

Mistake: Thinking Multi-AZ provides disaster recovery for regional outages.

Why it fails:

  • All AZs are within a single Region
  • Regional disasters affect all AZs
  • Multi-AZ only protects against AZ-level failures

Correct Approach:

  • For regional DR: Implement Multi-Region architecture
  • Use Cross-Region Read Replicas for RDS/Aurora
  • Consider Aurora Global Database for sub-second replication
  • Use S3 Cross-Region Replication for object storage
Pitfall 4: Undersizing for Failover Capacity

Mistake: Provisioning exact capacity needed, leaving no room for AZ failure.

Why it fails:

  • When an AZ fails, remaining AZs must handle all traffic
  • 2 AZ setup: Each AZ gets 100% of traffic on failover
  • Undersized instances become overwhelmed

Correct Approach:

  • 2 AZ deployment: Provision 200% total capacity
  • 3 AZ deployment: Provision 150% total capacity
  • Use Auto Scaling to handle burst during failover transition

Test Your Knowledge

Q

What is the key difference between RDS Multi-AZ Instance and Multi-AZ Cluster deployments?

AMulti-AZ Cluster has slower failover
BMulti-AZ Cluster standby instances can serve read traffic
CMulti-AZ Instance supports more database engines
DMulti-AZ Instance provides faster write commits
Q

A company has private subnets in 3 AZs using a single NAT Gateway in AZ-A. What happens if AZ-A fails?

ATraffic automatically routes through another AZ NAT Gateway
BPrivate instances in AZ-B and AZ-C lose internet access
CAWS automatically creates a new NAT Gateway
DThe application continues normally
Q

Which statement about Aurora Multi-AZ is TRUE?

AAurora requires manual configuration for Multi-AZ storage
BAurora replicates data 6 ways across 3 AZs automatically
CAurora failover takes 60-120 seconds like RDS
DAurora replicas cannot serve read traffic
Q

Cross-zone load balancing is enabled by default for which load balancer type?

ANetwork Load Balancer (NLB)
BGateway Load Balancer (GWLB)
CApplication Load Balancer (ALB)
DAll load balancer types


Quick Reference

Failover Times Comparison

Service Failover Times

ServiceFailover TimeReplication Type
RDS Multi-AZ Instance60-120 secondsSynchronous
RDS Multi-AZ ClusterUnder 35 secondsSemi-synchronous
AuroraUnder 30 secondsStorage: Synchronous (6-way)
ElastiCache RedisSeconds to minutesAsynchronous
ELB (unhealthy target)Health check interval + thresholdN/A

Multi-AZ Support by Service

Multi-AZ Support

ServiceMulti-AZ SupportNotes
RDSYesInstance or Cluster deployment options
AuroraBuilt-inStorage always Multi-AZ; add replicas for compute
DynamoDBBuilt-inAutomatically replicated across AZs
EFSBuilt-inData stored redundantly across AZs
ElastiCache RedisYesRequires Multi-AZ with Auto-Failover enabled
ElastiCache MemcachedNoNo replication support
NAT GatewayNo (AZ-scoped)Deploy one per AZ manually
ELB/ALB/NLBYesRegister targets in multiple AZs

Capacity Planning Formula

TEXTMulti-AZ Capacity Planning
2 AZs: Provision 200% capacity (each AZ = 100%)
3 AZs: Provision 150% capacity (each AZ = 50%)
4 AZs: Provision 134% capacity (each AZ = 33.3%)

Formula: Total Capacity = (N / (N-1)) * Required Capacity
Where N = number of Availability Zones

Further Reading

Related services

RDSELBAuto Scaling