Regions and availability zones
About this lesson
Cloud computers live in real buildings called data centres. Providers group them into regions, separate geographic areas such as eu-west-1 in Ireland, and inside each region into availability zones: buildings with their own power, cooling and network. Follow one app as it runs a copy in every zone behind a load balancer, survives a zone losing power, and keeps a backup in a second region.
The cloud is real buildings
The cloud is not in the sky. A cloud provider rents you computers that sit in data centres: big buildings full of servers, with their own power, cooling and network links. Where those buildings are matters.
cloud server = a real computer in a data centre (a building) with power, cooling, network you rent it; the provider runs the building so: where is the building?
Read the lesson step by step
The cloud is real buildings
The cloud is not in the sky. A cloud provider rents you computers that sit in data centres: big buildings full of servers, with their own power, cooling and network links. Where those buildings are matters.
cloud server = a real computer in a data centre (a building) with power, cooling, network you rent it; the provider runs the building so: where is the building?A region is an area
A region is a separate geographic area where the provider has data centres. AWS gives each one a code: eu-west-1 is Ireland, us-east-1 is Northern Virginia. You choose the region when you create a server.
region = a geographic area eu-west-1 Europe (Ireland) us-east-1 US East (N. Virginia) Google Cloud and Azure use the same idea (e.g. us-central1, westeurope)Zones inside a region
A region holds availability zones (AZs). Each zone is one or more data centres with its own power, cooling and network. AWS puts zones many kilometres apart, all within 100 km, joined by fast private links. Every AWS region has at least three.
eu-west-1 → three zones eu-west-1a own power, cooling, network eu-west-1b own power, cooling, network eu-west-1c own power, cooling, network many km apart, all within 100 km fast links between themPick a region
Choose the region near your users: data takes time to travel, so near means faster replies. Also check the law (some data must stay in one country), the price and the services offered. Our users are in Europe, so eu-west-1.
choosing a region (AWS guidance) latency near your users = faster compliance where data may be stored cost prices differ by region services not every service is everywhere users in Europe → eu-west-1A copy in every zone
Now deploy the app. Instead of one server, run an identical copy in each zone: eu-west-1a, eu-west-1b, eu-west-1c. If one building has a problem, the other copies keep working. This is a multi-AZ deployment.
one copy of the app per zone eu-west-1a app copy a eu-west-1b app copy b eu-west-1c app copy c no single building can stop the service = multi-AZ deploymentA load balancer shares work
A load balancer sits in front. Every request from a user reaches it first, and it passes each one to a copy of the app, spreading the work. Users see one address. They never choose a zone.
user → load balancer → a copy request 1 → app copy a request 2 → app copy b request 3 → app copy c one address for users, three copies behind itHealth checks
The load balancer also runs health checks: on a timer it asks each copy a simple question, such as fetching a test page. A copy that answers is marked healthy. Line 1 of the card keeps the same record.
health check: "are you there?" every copy answers → all up up = {"a": True, "b": True, "c": True} AWS ALB default: every 30 s, 2 failed checks → unhealthyA zone goes dark
Zone eu-west-1b loses power. Its copy stops answering, its health checks fail, and it is marked down. Line 2 records it: up["b"] = False. The other zones are separate buildings, so they keep running.
eu-west-1b: power cut ping → copy b … no answer marked unhealthy up["b"] = False zones a and c: unaffectedTraffic flows around it
Now requests go only to the healthy copies, in zones a and c. Line 3 lists them and prints ['a', 'c']. Users notice nothing. But each remaining copy now carries more of the load, so plan spare room.
print([z for z in up if up[z]]) ['a', 'c'] requests → copy a, copy c only users notice nothing each copy takes 1/2 of the load, not 1/3A second region
Rarely, a problem hits a whole region. So keep a backup copy of your data in a second region far away, such as us-east-1. Being ready to recover there is called disaster recovery. Zones guard against a building failing; regions guard against an area failing.
backup: eu-west-1 → us-east-1 zone fails → other zones serve region fails → recover in another region = disaster recovery
5 quick questions
Choose one answer per question. You can change your choices before checking them.
01What is an availability zone (AZ)?
A zone is one or more separate buildings inside a region. Each has its own power, cooling and network, so a problem in one zone does not spread to the others.
02Your users are in Europe. Which is the best first reason to pick a European region?
Data takes time to travel, so a region near your users answers faster. You also check the law, the price and which services the region offers.
03Why run a copy of the app in each of three zones?
Zones are separate buildings. With a copy in each, losing one building takes away one copy, not the whole service. This is a multi-AZ deployment.
04The card sets up = {"a": True, "b": True, "c": True}, then up["b"] = False when zone b fails. What does print([z for z in up if up[z]]) show?
Line 2 sets zone b to False. Line 3 keeps only the keys whose value is True, in the order they were added, so it prints ['a', 'c'].
05What protects you when a whole region has a problem?
Zones protect against one building failing. If an entire region is affected, you need your data and a way to run in another region far away.
Glossary
- Data centre
- A building full of servers, with the power, cooling and network links they need. Cloud computers live in data centres.
- Region
- A separate geographic area where a cloud provider has data centres, such as eu-west-1 (Ireland) or us-east-1 (N. Virginia).
- Availability zone (AZ)
- One or more data centres inside a region, with their own power, cooling and network. Every AWS region has at least three.
- Latency
- The time data takes to travel from one place to another and back. Nearer usually means lower latency.
- Load balancer
- A service that receives every request first and passes each one to a healthy copy of the app, spreading the work.
- Health check
- A regular test request a load balancer sends to each copy. A copy that fails it several times in a row is marked unhealthy and gets no traffic.
- Multi-AZ deployment
- Running copies of an app in several availability zones, so one zone failing does not stop the service.
- Disaster recovery
- Being able to restore a service somewhere else, such as another region, after a large failure.
Notes and sources
- Figures are AWS's: every AWS region has at least three availability zones, many kilometres apart and all within 100 km of each other. Google Cloud and Azure use the same two levels, regions and zones, with their own names and numbers.
- In AWS's oldest regions, for accounts created before November 2025, AWS maps zone names such as eu-west-1a to physical zones differently for each account, so your 1a may not be someone else's 1a. Zone IDs (such as euw1-az1) always name the same physical zone.
- On an AWS Application Load Balancer a health check runs every 30 seconds by default for server (instance or IP) targets, and two failed checks in a row mark a target unhealthy. Both numbers can be changed.
- The figure is simplified: real load balancers also run nodes in every zone, and a real app usually stores its data in a database that is copied between zones too.
- The code card is real Python 3. Dictionaries keep the order keys were added, so line 3 prints ['a', 'c'].
- AWS: Regions and Availability Zones
- AWS docs: AWS Regions
- AWS docs: AWS Availability Zones
- AWS Architecture Blog: What to consider when selecting a Region for your workloads
- AWS docs: How Elastic Load Balancing works
- AWS docs: Health checks for Application Load Balancer target groups
- AWS Well-Architected, Reliability pillar: Deploy the workload to multiple locations
- AWS whitepaper: Disaster Recovery of Workloads on AWS
- Google Cloud: Regions and zones
- Microsoft Learn: What are Azure availability zones?
- Python docs: Mapping types (dict keeps insertion order)
Quiz Unlocks after the last step.