Understanding AWS Global Infrastructure: What Is It and How Does It Work?
In the last blog, we learned about AWS account, its security and billing methods and that we should turn on logging for all regions of AWS Cloud, since resource billing/policies are different for different regions. Most of the AWS Services and Resources are region specific and some of them are accessible globally. Here we will deep dive into AWS Global Infrastructure and how to design an optimum structure for your application.
AWS Global Infrastructure stretches across 31 geographic Regions with 99 Availability Zones (AZs) around the world, and with a plan for 12 more Availability Zones (AZs) within 4 additional AWS Regions.
AWS REGIONS
A region is a physical location of AWS Infrastructure setup around the world consists of minimum of three availability zones, each having a cluster of data centers. AWS customers focused on high availability can design their applications to run in multiple AZs to achieve even greater fault-tolerance and reduced network latency. Not all AWS services are available in every region, so when you view your resources you see only those that are tied to the AWS Region which you specified.
AWS Availability Zones (AZs)
An AWS availability zone (AZ) is group of one or more distinct data centers with redundant power, networking, and connectivity that acts as logical building block of an AWS region.
These AZs are interconnected with low-latency network. Both AWS regions are physically isolated and can communicate with each other over Amazon Global Network.
How to select a Region?
One should try to follow these best practices while choosing a region in order to ensure the application is resilient and performs its best:
- Proximity: Select a region which is closest to your location and your customers’ location to minimize network latency.
- Services: As we know not all services and resources are available in every region, one should design their application based on the most required services for the application to function well and are available in a single region. Then list out other additional services which can be added in other regions accordingly.
- Cost: Certain regions will cost more than the others, so one should utilize AWS billing and budget alert to estimate an overall cost for monthly/yearly basis.
- Compliance: You need to meet regulatory compliance by making sure that location restricted information is deployed to that specific regions.
For example: In above diagram, a customer has their application running in two different regions US and India having different AZs within, to provide a better experience for the users of both geographic regions. As we can see, AWS is designed to build an entire application within a single Region and distributed across availability zones having data center instances with desired physical distance (~50km to 100km) between them. If an application needs to be in multiple regions, multiple instances of the application runs independently i.e., one instance within each region. This allows us to have access to a local instance of an application available for individual geographic region, without network latency and high cost for communication in between.
Let’s take same above diagram as reference: what if, one of the data center or AZs goes down due to some issues such as power outage, tornadoes, earthquakes, or more, the other AZs and their data centers will continue working and thus application is still accessible. AWS infrastructure is designed to protect and insure the availability of application such that if a data center or AZ is shutdown the incoming traffic of users will be diverted to the next nearest AZ. This is also known as Disaster Recovery ability of AWS Infrastructure.
Now the question arises: what if your application is experiencing high traffic from customers who are located far from the selected AWS Regions? And also what if your application has sudden increase in number of users among some of the AZs of same Region. Here comes AWS Edge Location into action.
What are AWS Edge Locations?
Edge Locations are AWS data centers are designed to deliver data/content faster to the users. They are located closer to the user than Regions and AZs, generally around high populated areas around the globe.
Edge Locations are not utilized to deploy the main infrastructure of application such as EC2 instances, VPCs, or Database resources, they are used to cache data/ content from other AZs or Regions to simplify user access. The process of caching copies of data/ content to users is known as Content Delivery Network (CDN).
Some of the services used by Edge Locations include:
- CloudFront is AWS CDN and is used to store cached copies of application to fetch content faster to the users.
- AWS Route 53 serves DNS responses from Edge Locations. It directs clients to the appropriate web locations.
- Web Application Firewall and AWS Shield are the AWS services which filters traffic in edge location so as to discard the malicious or unwanted traffic and thus reduces congestion on Amazon’s Global Network.
Let’s take the above network map as an example to understand how these services are utilized. We have deployed an application in one of the AZs of US Region, and now your user base is increasing in India to access US based content, so instead of making users send request to US server, we can store cached copies of the application locally in specified Edge Locations in India. This is done by using CloudFront Service. The users who attempt to access the US application will be redirected to the nearest Edge Location through DNS response generated by AWS Route 53.
Conclusion
We learnt about the AWS Infrastructure, how distributing our application in different geographic and network areas are important in cloud.
While launching an application, you won’t get enough information about where it is running but AWS provides sufficient details to design and diversify your decisions.
P.S. If you read it till the end, Thank you!…
This article is part of AWS Career Growth Program (AWS-CGP) by Pravin Mishra
For more AWS related content please visit the website.