The AWS global architecture has four components:
Datacenters
Availability zones
Regions
Edge locations and regional edge caches
The smallest piece of the AWS infrastructure is a datacenter. AWS builds its own datacenters as well as operates in third-party facilities. Customers have no visibility at the level of datacenters and their locations. The lowest level of AWS resource abstraction is an availability zone. A typical AWS datacenter has the following characteristics:
Between 50,000 and 80,000 compute units per datacenter in approximately 500–100 racks
Approximately 11 petabytes storage capacity per rack
Up to 100 terabits per second of connectivity on a proprietary redundant network layer and network security stack
Datacenters are grouped together into an availability zone. An availability zone is designated as a fault isolation environment where a failure might affect all datacenters in the group. Multiple availability zones are independent of each other and are connected with low-latency private links to create a region. Many services are distributed across availability zones to provide high availability; however, if a service deploys an instance into one availability zone, you are able to deploy another copy to another availability zone to make it highly available. For example, one EC2 server instance can be deployed on only one hypervisor in one datacenter; this means it can reside in only one availability zone. To make an application highly available, you need to deploy two identical EC2 instances, each in its own availability zone.
A number of AWS regions are distributed across the globe. When you deploy your application, you also choose a region that will enable you to reach your intended audience with the lowest latency possible. When choosing a region, you should always consider the following factors:
Data sovereignty: Are there laws that you need to conform to in a certain region, or can you store the data anywhere?
User proximity: How far from the users can you host the services?
Regional resilience: Regions can go down too. Do you need to withstand a region outage?
Service availability: Is the service you are using available in the region? Not all services are available in all regions.
Regional pricing: Pricing in regions is different because AWS charges what it costs to run services in a certain region.
On top of an availability zone’s high availability within a region, you can also create applications that are replicated across regions; however, when designing cross-region deployments, make sure to consider the following factors:
Synchronous replication across multiple regions is probably not possible due to higher-than-single-digit millisecond latency between the locations.
Replication traffic counts against outgoing data transfer costs.
Several managed services are designed to provide built-in replication support across multiple regions. Consider using those.
Ensure that a plan is in place to recover and resynchronize after a region outage.
Client latency can be increased in case of failover to a distant region, which can negatively influence user experience and still breach the conditions of the application’s service-layer agreement (SLA).