Blog Main Image

Mitigate Regional Failover and Improve Performance using AWS Global Accelerator

By Khushi Carpenter / Sep 09,2023

AWS Global Accelerator is a powerful network service that improves the availability and performance of applications by routing traffic to the closest AWS endpoint. This can help mitigate regional failover risks and improve the user experience for applications that are accessed by users in multiple regions. 

Global accelerator can be used for the following scenarios:

Global Application Delivery 

  • Disaster Recovery (DR) and Business Continuity 
  • High Availability and Fault Tolerance 
  • Application Migration 
  • Cross-Region Load Balancing 
  • API Endpoints 

Let's look at the benefits and features of AWS Global Accelerator using a specific use case. 

Suppose you have an application deployed in two AWS regions: US East (Virginia) and Asia Pacific (Mumbai). The Mumbai region stands as a backup region in case of a disaster. You are using an active configuration for better performance and availability. 

Here are some of the benefits of using AWS Global Accelerator in this use case: 

  • Anycast IP addresses: AWS Global Accelerator provides your application with static Anycast IP addresses. These IP addresses are globally distributed, so users are always routed to the closest AWS edge location, regardless of their location. This helps to improve performance and reduce latency.
  • Health checks: AWS Global Accelerator continuously monitors your endpoints to ensure that they are healthy. If an endpoint becomes unhealthy, Global Accelerator will automatically stop routing traffic to it and divert traffic to a healthy endpoint. This helps to minimize disruptions to your application.
  • Traffic Diversification: AWS Global Accelerator can route traffic across different AWS regions. This helps to improve fault tolerance and reduce the risk of a single point of failure. You can also customize the routing policies to meet your specific needs.
  • Endpoint weights and priority: You can assign weights and priorities to your endpoints to control how traffic is distributed. This can be helpful for ensuring that traffic is evenly distributed across regions or for prioritizing traffic to specific regions. In this context, us-east-1 has been assigned a weight of 80 and a priority level of 1, ap-south-1 has a weight of 15 and priority level of 2 and let’s take an additional region which is eu-central-1 which has a weight of 5 and priority level of 3. Under normal operating conditions, us-east-1 is responsible for handling 80% of traffic, with ap-south-1 and eu-central-1 handling 15% and 5%, respectively. In the event of a failover, traffic is automatically redirected to ap-south-1 due to its higher priority.
  • Static IP address with BYOIP (Bring your own IP): WS Global Accelerator can use your own static IP addresses. This can be helpful if you need to maintain a consistent IP address for your application, even if the underlying endpoints change. For example, for a disaster situation, the traffic would be redirected to ap-south-1 endpoint, and the IP address would change. Instead of updating the DNS every time, Global Accelerator can provide you with one static IP address, eventually removing the need for changing the IP address constantly.
  • Accelerated and optimized routing: AWS Global Accelerator uses a private global network to optimize traffic routing. For instance, when users access your app from different regions like North Virginia and Frankfurt, Global Accelerator directs their traffic to the nearest AWS edge location via the private network. This reduces latency and congestion, providing a faster and more reliable user experience compared to the public internet routing.
  • Client Affinity: With AWS Global Accelerator, you can ensure that your stateful applications maintain consistency by directing all requests from a user to the same endpoint, regardless of port and protocol. This is particularly useful for stateful gaming applications, where each user's requests are consistently routed to the same gaming server to maintain their game state throughout the session. By using this feature, you can provide a seamless and uninterrupted gaming experience for your users, no matter where they are in the world.
  • DDoS resiliency at the edge: Global Accelerator works flawlessly with other AWS services like AWS Shield (for DDoS protection) and AWS Web Application Firewall (WAF), providing additional layers of security and reliability for your application. 

Here is an example that demonstrates AWS Global Accelerator that improves regional failover and performance. 

  • Step 1: Create two EC2 instances in two different regions, each with a website hosted on it.
    These instances are connected to an Application Load Balancer (ALB), which distributes traffic between them.

  • Step 2: Configure AWS Global Accelerator to accept incoming connections on TCP port 80.
    You can also listen on other ports and support both TCP and UDP protocols.


    In this scenario, you are using an active-active configuration for Global Accelerator.
    This means that you are routing traffic to both regions equally. You have set the traffic dial to 100% for both regions. For a disaster recovery (DR) use case, you would set the primary region to 100% and the secondary region to 0%.


    Endpoints in Global Accelerator are grouped together and can be accessed using Network Load Balancers (NLBs), Application Load Balancers (ALBs), or Elastic IP addresses.
    The weight assigned to each endpoint determines its priority. In this case, you have chosen to direct your request to an ALB. The ALB then transfers the request to the EC2 instance that is responsible for the web application.
    Each group has its own ALB that is specific to its region.

  • Step 3: Once Global Accelerator is configured and the corresponding DNS is set, users in the Asia Pacific (Mumbai) region can access the application.
    This is especially convenient for users like you who are in Ahmedabad, as Mumbai is closer to you than Virginia.
    Both Availability Zones (AZs) are used in a round-robin fashion.


    To simulate a disaster scenario, you can remove the ALB from the Asia Pacific (Mumbai) region.
    This is the region that is closest to your location, so removing the ALB will make it more difficult for you to access the application.

  • Step 4: After a few moments, the website will be redirected to the other region, which is US East (Virginia) and both Availability Zones (AZs) in a round-robin fashion.

    After a few moments, the website was redirected to the other region, which is US East (Virginia) and both Availability Zones (AZs) in a round-robin fashion.

Best practices for optimizing your AWS Global Accelerator implementation:

  • Carefully choose the regions where you deploy your application endpoints, considering the geographical distribution of your users. You may also want to consider using AWS CloudFront or Amazon CloudFront with Global Accelerator to enhance content delivery and caching.
  • Regularly monitor the health of your application endpoints to ensure efficient traffic routing and maximum availability.
  • Make sure you are familiar with AWS Global Accelerator's network policies to ensure that traffic is correctly routed to your application endpoints.
  • Utilize AWS CloudWatch Logs and Metrics to gain valuable insights into your application's performance, identify bottlenecks, and optimize your setup accordingly. By following these best practices, you can ensure that your AWS Global Accelerator implementation is optimized for maximum efficiency and performance.

By following these best practices, you can ensure that your AWS Global Accelerator implementation is optimized for maximum efficiency and performance. 

Conclusion

To conclude, AWS Global Accelerator offers businesses the ability to mitigate regional failover risks and improve application performance by leveraging the AWS private global network. It provides features like Anycast IP addresses, health checks, traffic diversification, and endpoint weights and priorities for optimized routing. With Global Accelerator, businesses can ensure low-latency, fault-tolerant, and high-performing application delivery, enhancing the user experience worldwide. 

 

Main Logo
Rocket