Availability Zones and Subnets
What you'll learn: How spreading subnets across availability zones protects your applications from data center failures.
What Are Availability Zones?
Availability Zones (AZs) are physically separate data centers within a cloud region, each with independent power, cooling, and networking. Think of them as isolated buildings in the same city — if one building loses power, the others keep running.
Mapping Subnets to Availability Zones
When you create a subnet (remember, a subnet is a subdivision of your virtual network's IP address space), you assign it to one specific availability zone. This means the resources you launch in that subnet will physically run in that AZ's data center.
The key insight: By creating multiple subnets in different availability zones, you can spread your application across separate physical locations.
Why This Matters for High Availability
Imagine you're running a web application:
- Single AZ approach: All your servers in one subnet in
us-east-1a— if that data center has problems, your entire application goes down. - Multi-AZ approach: Servers in subnets across
us-east-1a,us-east-1b, andus-east-1c— even if one AZ fails, servers in the other zones keep serving traffic.
Fault Tolerance Strategy
Using the CIDR notation concepts you learned earlier, you might divide your 10.0.0.0/16 virtual network like this:
- Subnet A:
10.0.1.0/24in Availability Zone 1 - Subnet B:
10.0.2.0/24in Availability Zone 2 - Subnet C:
10.0.3.0/24in Availability Zone 3
Now you have the same application layer replicated across three physically separate locations.
Key Takeaway: Each subnet lives in exactly one availability zone, so designing subnets across multiple AZs is essential for building resilient, highly available cloud applications that survive data center failures.