Networking & Content Delivery

Improving availability and performance for Application Load Balancers using one-click integration with AWS Global Accelerator

AWS Global Accelerator improves the availability and performance of your applications. It provides customers with a global fixed entry point to their Application Load Balancers (ALB), Network Load Balancers (NLB), EC2 instances, or Elastic IPs. AWS Global Accelerator uses the AWS global network to direct end users’ traffic to a healthy application endpoint in the closest AWS Region to the client, improving latency and throughput of your application traffic. Customers who use the service with Application Load Balancer (ALB) or EC2 instances can see as much as a 60% performance improvement for their TCP traffic. Today, we want to talk about an AWS Management Console feature that makes it easier to use AWS Global Accelerator with your Application Load Balancer.

Putting AWS Global Accelerator in front of your ALB involves a multi-step process that includes creating an accelerator, adding a listener to the accelerator, adding endpoint groups to the listener, and finally, attaching your load balancer to the endpoint group. While this process takes around 10 minutes, learning how to do it right the first time can take longer. This process requires you to duplicate settings such as protocol, port, and AWS Region in both configurations.

In this blog post, I am going show you an AWS Management Console feature that can accelerate your load balancers with just one click of a button. When you enable acceleration from your ALB console, AWS ALB and Global Accelerator work together behind the scenes to transparently set up an accelerator in your AWS account. Once enabled, you are able to see the new accelerated endpoint’s details, such as the two static IP addresses and the global DNS name, right in the ALB console. Let’s take a look at how to use this feature.

One-click acceleration for existing ALB/NLB:

  • Login to your AWS ELB Console
  • Select the Load Balancer that you want to enable acceleration for
  • Scroll down and click on Integrated Services tab:

  • Select Create Accelerator and it prompts to you enter the Global Accelerator name in the box. Select the name as per the requirements given in the prompt
  • Once the Global Accelerator is created, you should see the following information on your ELB console:

 

 

  • You can now update your client’s settings to point to either Global Accelerator’s DNS name or the set of IP address. If you see an error when creating an accelerator, make sure you have the correct IAM permissions for AWS Global Accelerator.

AWS Global Accelerator resources that are created when you enable this feature

Accelerator – An accelerator that receives traffic from your end users. It has a unique DNS name and two static IP addresses.

Listener – A listener to process inbound connections from clients to the accelerator, based on the protocol and port.

Endpoint Group – Endpoint groups define the different AWS Regions where your application is deployed.

Traffic Dial – Configured on an endpoint group to dictate the percentage of traffic an endpoint group can receive. In the default setting, 100% traffic dial is configured. (More details on how to manage your traffic for endpoint groups can be found in this blog post.)

Endpoint – An endpoint is either a Network Load Balancer or an Application Load Balancer.

Health check – For Application Load Balancer or Network Load Balancer endpoints, you configure health checks for the resources by using Elastic Load Balancing configuration options. (For more information, see Health Checks for Your Target Groups).

Switching production traffic from AWS ELB to AWS Global Accelerator

Your accelerator is ready to accept production traffic, and now we have to change our DNS configuration so the traffic is routed to AWS Global Accelerator. If you are using Route 53 as your DNS service, you can use Weighted Routing Policy to load balance your DNS production traffic between AWS ELB and AWS Global Accelerator. This can be useful to gradually move your traffic to a new service and to achieve the best uptime for your application. Once you are ready to receive all of your production traffic via AWS Global Accelerator, you can update your DNS configuration to stop accepting traffic on your ELB domain name.

If you are using a third-party DNS service, refer to their configuration guide on how to configure a DNS record set.

Note: You are charged an hourly rate and data transfer charges for this accelerator. For more information, see AWS Global Accelerator pricing.

Enabling acceleration when creating a new ALB:

  • Login to your AWS ELB Console
  • Select Application Load Balancer.
  • Follow instructions on creating an Application Load Balancer here
  • You see an option to add AWS Global Accelerator in “1. Configure Load Balancer” step of the wizard.
  • Enter Accelerator’s name. I entered “AGAforALB” in the Accelerator name field as shown in the following:

  • Proceed through the process of configuring your Application Load Balancer.
  • After successful creation of your Application Load Balancer, the following message should appear:

  • To access the new created accelerator’s details such as IP addresses and domain names, navigate to your load balancer and click on the Integrated Services tab.

Configuring DNS service to route traffic to AWS Global Accelerator

If you are using Route 53, see the following document on how to create a new Record Set to use a custom domain name for routing production traffic to your AWS Global Accelerator. If you are using a third-party DNS service, please refer to their guide on how to set up DNS resource record sets to start routing your traffic to AWS Global Accelerator.

I want to add another Application Load Balancer to my AWS Global Accelerator. How do I do that?

You can attach multiple endpoints to a single accelerator. Here is how you can add another load balancer to your existing accelerator:

  • Login to your AWS Global Accelerator console and select the accelerator associated with your AWS ALB.

  • Click on the Listener ID shown in the preceding image to navigate to an endpoint group.
  • Once you have clicked on the Listener ID, you should see the Endpoint group ID that was created for you when you added Global Accelerator in the ELB console.
  • If you want to create another endpoint group to add backend resources, refer to this document.
  • You can control what percentage of incoming traffic goes to a specific endpoint group using traffic dials. More details on how to manage your traffic for endpoint groups can be found in this blog post.
  • If you are working with only one endpoint group, then select the Endpoint group ID.
  • Select Add Endpoint.
  • The final step is to add a new load balancer or another resource to your endpoint group ID as shown in the following image:

Cleanup

To avoid incurring costs after you create this proof of concept, clean up the resources by deleting the accelerator and the Application Load Balancer. For more information, see Deleting an accelerator and Deleting an Application Load Balancer in the AWS documentation.

Conclusion

In this blog post, we learned about how to easily accelerate your Application Load Balancer and Network Load Balancer. To improve your application’s performance, add AWS Global Accelerator your infrastructure today. To learn more about all of the Global Accelerator features visit our website.

Tirth Vyas Headshot

Tirth Vyas

Tirth is a Sr. Edge Specialist SA based out of San Francisco. He enjoys working with customers to help them create specialized solutions for fast, secure, and reliable online content delivery. Through out his career he has honed his technical expertise in computer networking, content delivery, and security.