Where your server actually lives
AWS does not have one giant data center. It has clusters of them all over the world.
- A region is a city-sized cluster, named after its location:
us-east-1(Virginia),eu-central-1(Frankfurt),ap-northeast-1(Tokyo). There are over 30. - An availability zone (AZ) is one or more data centers inside a region, with independent power, cooling, and network. A region has at least 3, named
us-east-1a,us-east-1b, and so on.
Why the split? A flood or power cut can take out one building. AZs are far enough apart that one disaster rarely touches two, but close enough that computers in different AZs talk in about a millisecond. Running your app in two AZs is the standard first step toward surviving a bad day.
Choosing a region
Three things decide it:
- Latency. Light in fiber takes real time. A user in Berlin talking to Virginia adds roughly 90 ms to every request, so you deploy near your users.
- Law. Some data legally has to stay in a country (health records in Germany, for example). You pick the region inside that border.
- Price and features. New services and lower prices tend to reach
us-east-1first.
Data does not move between regions unless you move it. If you launch a server in eu-central-1, that is the only place it exists.
Code exercise · bash
The latency rule is physics you can compute. Light in fiber covers about 200 km per millisecond, and a request has to go there AND back. The script estimates the round trip from Berlin to us-east-1 in Virginia (~6,700 km of cable). Your turn: append the same two lines for a user in Tokyo, ~10,900 km from Virginia, matching the expected output. Then note why ap-northeast-1 exists.
Quiz
An availability zone is best described as:
Problem
A hospital app for German patients must keep data on servers physically in Germany, and its users are all in Germany. Following the AWS naming pattern from this lesson, which region should it deploy to?