Deploying a solution with global users has constraints as users from around the world are trying to access it. This even becomes more difficult as the application is deployed in one region. Users from Europe, America, Africa etc trying to access an application over the internet will experience latency due to many hops through the router. Going through these hops can create the risk of lost connection. Users around the world need to access the content as quickly as possible and not experience latency. The solution lies in going through the Amazon infrastructure, using the AWS Global Accelerator. The AWS Global Accelerator leverages Anycast IP(this means that all servers hold the same IP address and the client is redirected to the closest one).
The AWS Global Accelerator works by leveraging the AWS internal network to route to the Application using Edge location, accessing the Application load balancer. The AWS Global Accelerator works with Elastic IP, EC2 instances, ALB(Application load balancer), and NLB(Network load balancer), which can either be private or public. The Global Accelerator ensures consistent performance, health checks, and security. The use case for the AWS Global Accelerator includes gaming, IoT, VoIP, and HTTP that require static IP addresses globally and fast failover.
Let us see how the Global Accelerator works (NB: this is not a free AWS service).
We need to first create our application by going to the EC2 Instance service
-Launch Instance
-Choose the free tier
-Create Security Group and Launch Instance
-Launch another EC2 instance in a different Region following the same process as above. Test if both instances are working by copying Public DNS in a browser(should get the Hello World prompt)
-Navigate the AWS console to AWS Global Accelerator
-Create Listeners
-Add End Point and Health checks for both Instances
-Then add End Point Group afterwards
-Copy the DNS name, and paste into a browser to test it. I got this below as it is the closest and fastest Region to me.
-To test if this works, I used a VPN to change my location to Singapore.
-To see if the Global Accelerator can serve content all over the world, we will make the 2nd EC2 instance(Mumbia) unhealthy by deleting the security group.
-We can see the EC2 instance has become unhealthy. To test if the Global Accelerator works, we need to refresh the page.
Viola, we got a response from eu-east-1.
That's it folks, everything works perfectly as expected.
Till you read from me again, don't forget to clean up your deployed resources. Cheers!!!
Top comments (0)