# AWS Global Infrastructure

* AWS global infrastructure enables applications using AWS services to have redundancy which will help in quick recovery in case of failures.
* This is achieved by having infrastructure distributed in form of **regions** (groups) and **availability zones**.

Read more about AWS global infrastructure [here](https://aws.amazon.com/about-aws/global-infrastructure/).

## AWS Regions

* Region is nothing but a cluster of datacenters.
* Each region is geographically isolated from other regions.
* Each region is made up of [availability zones](#availability-zones) usually minimum 3, maximum 6.
* When determining the right region for your services, data, and applications, consider the following four business factors.
  * **Compliance with data governance and legal requirements**
    * Depending on your company and location, you might need to run your data out of specific areas. For example, if your company requires all of its data to reside within the boundaries of the UK, you would choose the London Region.
    * Not all companies have location-specific data regulations, so you might need to focus more on the other three factors.
  * **Proximity to your customers**
    * Selecting a region that is close to your customers will help you to get content to them faster. For example, your company is based in Washington, DC, and many of your customers live in Singapore. You might consider running your infrastructure in the Northern Virginia Region to be close to company headquarters, and run your applications from the Singapore region.
  * **Available services within a region**
    * Sometimes, the closest region might not have all the features that you want to offer to customers. AWS is frequently innovating by creating new services and expanding on features within existing services. However, making new services available around the world sometimes requires AWS to build out physical hardware one region at a time.
  * **Pricing**
    * Suppose that you are considering running applications in both the United States and Brazil. The cost of services can vary from region to region.

## Availability Zones

* A single or group of data centers **within a region** is called an Availability Zone(AZ).
* AZs are located tens of miles apart from each other. This is close enough to have low latency (the time between when content requested and received) between Availability Zones. However, if a disaster occurs in one part of the Region, they are distant enough to reduce the chance that multiple AZs are affected.
* They are connected with high bandwidth and ultra-low latency networking, redundant power.
* So when you start a new EC2 instance in AWS, multiple EC2 instances are started across different AZs to make sure services are not disrupted completely in case of failures.
* AWS recommends to run across 2 AZs.

Read more about regions and availability zones [here](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/).

![AWS Regions and Availability Zone Diagram](https://574639531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJDnjsv52I3fJ56WbLgHu%2Fuploads%2Fgit-blob-037a53076b5dc8a4033efd757dd57c09cab8f47e%2FRegions_AvailabilityZones.png?alt=media)

AWS Regions and Availability Zone Diagram

## Edge Locations

* AWS has more than 400 Point of Presence in 90+ cities and 40+ countries.
* The concept of [Content Delivery Networks (CDN)](https://en.wikipedia.org/wiki/Content_delivery_network) is used for caching copies of data closer to the customers who are far away from services.
* In AWS, this CDN is called **Amazon CloudFront**. This service helps to deliver data to customers around the world at a low latency, hence acting as a global content delivery network service.
* Amazon CloudFront uses edge locations. This edge locations are separate from the regions.
* AWS edge locations also runs AWS DNS(Domain Name Service) known as **Amazon Route 53**.
* Another service called **AWS Outposts** is a family of fully managed solutions delivering AWS infrastructure and services to virtually any **on-premises or edge location** for a truly consistent **hybrid** experience.

## References

* Global Infrastructure reference in [AWS](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/).
