AWS Global Accelerator, What is it and how to deploy?
Today, we will talk about AWS Global Accelerator which is one of the Networking service in AWS. So if you want better performance for your applications, Global Accelerator is the best choice for your your global and local users.
Based on your accelerator type, we will gain additional benefits:
It means supporting Multi-Region access to your apps to provide a kind of redundancy. It provides you with multiple endpoints based on different types for your requested region.
Think about it, you can access your apps or whatever you have deployed on AWS through different Edge networks which are located all around the world. By default, Global Accelerator provides you with static IP addresses that you associate with your accelerator. The static IP addresses are anycast from the AWS edge network. For IPv4, Global Accelerator provides two static IPv4 addresses. For dual-stack, Global Accelerator provides a total of four addresses: two static IPv4 addresses and two static IPv6 addresses. For IPv4, instead of using the addresses that Global Accelerator provides, you can configure these entry points to be IPv4 addresses from your own IP address ranges that you bring to Global Accelerator (BYOIP).
As I mentioned above, Global Accelerator uses the AWS global network to route traffic to the optimal regional endpoint based on health, client location, and policies that you configure, which increases the availability of your applications. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, Amazon EC2 instances, or Elastic IP addresses that are located in one AWS Region or multiple Regions. The service reacts instantly to changes in health or configuration to ensure that internet traffic from clients is always directed to healthy endpoints.
Here is a brief for Global Accelerator components that are used during deployment:
·????? Static IP Address: Global Accelerator provides you with static IP addresses that you associate with your accelerator. The static IP addresses are anycast from the AWS edge network. For IPv4, Global Accelerator provides two static IPv4 addresses.
·????? Accelerator: An accelerator directs traffic to endpoints over the AWS global network to improve the performance of your internet applications. Each accelerator includes one or more listeners.
·????? DNS Name: Global Accelerator assigns each accelerator a default Domain Name System (DNS) name, similar to?a1234567890abcdef.awsglobalaccelerator.com , that points to the static IP addresses that Global Accelerator assigns to you or that you choose from your own IP address range.
·????? Network Zone: Similar to an AWS Availability Zone, a network zone is an isolated unit with its own set of physical infrastructure.
·????? Listener: A listener processes inbound connections from clients to Global Accelerator, based on the port (or port range) and protocol (or protocols) that you configure.
·????? Endpoint Group: Each endpoint group is associated with a specific AWS Region. Endpoint groups include one or more endpoints in the Region.
·????? Endpoint: An endpoint is the resource that Global Accelerator directs traffic to. Endpoints for standard accelerators can be Network Load Balancers, Application Load Balancers, EC2 instances, or Elastic IP addresses.
In addition for a better understanding of Global Accelerator's better performance, you can visit the AWS Official site for comparison. (visit this link )
As you see below, we can see the comparison of all of the regions vs Global Accelerator.
Ok, let's do a demo for a better understanding of Global Accelerator. In this scenario, I will use 2 different regions (eu-central-1 and eu-west-1). I will set up 2 basic EC2 per Region and deploy an ALB in front of EC2 Instances. Here we go ??
?1st instance in eu-central-1
2nd instance in eu-west-1
Next, I have deployed 2 Load Balancers with a Target group which is shown as created instances as a target. Both of them are in a healthy situation and show the web server successfully.
As you see, I have deployed Load Balancers in different Regions. Now it's time to deploy Global Accelerator.
To start, type Global Accelerator in the search box and choose GACC.
Press on Create Accelerator, give a name, and select Standard Accelerator.
Note:
·????? A?standard?accelerator directs traffic to the optimal AWS endpoint based on several factors, including the user’s location, the health of the endpoint, and the endpoint weights that you configure.
·????? A?custom routing?accelerator lets you deterministically route multiple users to a specific EC2 destination behind your accelerator, as is required for some use cases.
For the listener part, enter 80 and 443 ports and the TCP protocol type. For Client affinity, we can continue with none.
Note:
·????? If you have stateful applications that you use with a standard accelerator, you can choose to have Global Accelerator direct all requests from a user at a specific source (client) IP address to the same endpoint resource,
For the endpoint group, you can select both regions which have deployed resources. And for traffic dial, you can choose load sharing percentage based on your requirements.
Based on your selected Endpoint Group you can select deployed resources in the regions, Because I deploy my web servers with ALB I selected ALB and related ARN for that.
And then press on Create Accelerator.
It will take a while to deploy the Accelerator. After deployment, we will have 2 Anycast IP Addresses that are stable. Also, we can use the created CNAME for our DNS Server.
For my scenario, I will create a CNAME Record to demonstrate Load sharing between resources in different regions.
After creating a record for Route53 I tried to test the web server and Global Accelerator.
Here is the result for the deployed web servers:
I have tried in 2 different web browsers with the same DNS name. Done ??
?
Key Takeaways
If you have 2 applications deployed in 2 different regions and want to accelerate the app for HA purposes it's better to use Global Accelerator. As mentioned above, GACC can provide better performance than normal public internet. In addition, if you want to have a static IP that never changed, GACC is another possibility for this kind of requirement.
References:
Awesome article!
Matris Bili?im ?irketinde Support Engineer
4 个月Great advice!