Region
A region is a geographic area, such as a metro area or a country, where a provider runs datacenters under one name. Choosing a region decides where a workload physically runs. The machine types and services on offer differ between regions, since new hardware often reaches the largest ones first. Prices can differ too, following local costs of power and land.
That choice sets how far the workload's traffic travels and which laws apply to its data. It also decides which failures the workload shares with its neighbors in the same place. A storm or a grid failure in one area reaches every workload there at once. Spreading work across places is the only way to avoid sharing that fate.
Each region usually has its own control plane, so an outage in one does not spread to others. Large providers divide each region further into smaller units that fail on their own. Resources created in one region are usually managed only there, so moving a workload means recreating it. Features that span regions, such as global load balancing, have to be built on top of that separation.
Availability zones
Availability zones are separate groups of datacenters inside one region. They sit close enough to link with low latency, and far enough apart that one flood or power cut does not take down both. Traffic between zones is fast enough that a database can copy each write to another zone before confirming it. A provider usually offers a few zones in each region.
Zones in a region share its control plane but not their hardware or power. A service can run copies in several zones to survive the loss of a datacenter without leaving the region. Running in several zones costs extra machines, and often a fee for traffic that crosses between them. A load balancer in front of the copies sends requests only to the zones that are still healthy.
Regions and zones are failure domains, the units that fail as one. A service that must survive the loss of a whole region runs in several regions, paying for the extra capacity and for keeping data in sync. Spreading across regions is harder, because distance makes keeping copies in step slow. Most services accept that a remote copy lags slightly, and that a little recent data may be lost when a region fails.
| Aspect | Region | Availability zone |
|---|---|---|
| Scale | A metro area or a country. | One or more datacenters inside a region. |
| Distance between peers | Hundreds to thousands of kilometers. | Tens of kilometers or less. |
| Fails together | Rarely, and only in a large outage. | When the power, cooling or network of that zone fails. |
Distance and latency
Distance and latency are tied, because a signal can travel no faster than light in fiber. Distance therefore sets a floor under latency that no hardware removes. Light travels more slowly in glass than in a vacuum, and cables rarely take the straight path between two cities. Real latency therefore sits somewhat above the floor that a straight line would give.
A request between continents spends a large share of its time on the round trip before any work starts. The cost repeats on every call, so programs that make many small calls feel it most. Setting up a secure connection takes several round trips before the first byte of data, which multiplies the cost. Protocols that reuse connections or send requests in batches cut the number of trips.
Placing work in the region closest to its users avoids most of that cost. Placing it close to the data it reads matters as much, since every read pays the same trip. When users are spread across the world, a service can run in several regions and send each user to the nearest. Data that must stay consistent is harder to spread, so some services move the compute to the data instead.
| Measure | Typical value |
|---|---|
| Light in fiber | Light covers roughly 200 kilometers of fiber per millisecond. |
| Round trip within a region | A round trip between zones takes around a millisecond or less. |
| Round trip between regions | A round trip takes tens to hundreds of milliseconds. |
| Europe to the western United States | A round trip takes on the order of 100 milliseconds. |
Data residency
Data residency is the requirement that data stay inside a given country or region. Laws and contracts often demand it for data about the people of one country. European rules on personal data, for instance, restrict copying it to countries without equal protection. Some customers demand residency by contract even where no law does.
Regions make residency possible, because each one keeps the data written to it in one place. Data written to block storage or object storage in a region stays there unless someone copies it out. Choosing the region when the data is created therefore fixes where it lives. Some services are global and keep data wherever the provider chooses, which can break residency without anyone noticing.
Backups and snapshots count too, since a copy kept in another region takes the data out as surely as a move. Logs can leak it the same way when they record what users sent. Encryption helps where the rules accept it, since data that leaves in encrypted form is useless without keys kept at home. Residency therefore covers every copy, not only the main one.
Sandbox regions
A sandbox region is the region in which a sandbox runs, chosen when the sandbox is created. While it runs, its processes, memory and disk live on hosts in that region. When it stops or is archived, its disk may move to storage in the same region. Every command sent to the sandbox, and every reply, travels to that place and back. The choice therefore affects both speed and where the sandbox's data is kept.
An agent that sends many short commands to a sandbox pays the network round trip on each one. A sandbox in a far region adds tens of milliseconds to every step, which adds up over a long task. Placing the sandbox near the program that drives it keeps each step short. When the agent and its users sit in different places, the sandbox usually goes nearest the agent, since the agent sends the most traffic.
A sandbox's disk, snapshots and any files it writes stay in its region unless they are copied out. Rules on data residency can therefore limit which regions a sandbox may use. Moving a sandbox to another region means copying its disk, and often its memory, across the distance. Platforms that offer several regions usually leave the choice to the caller, with a default near most of their users.