Important Note: You will create AWS resources during the exercise which will incur cost in your AWS account. It is recommended to clean-up the resources as soon as you finish the exercise to minimize the cost.

Improving Application Performance using Amazon Global Accelerator

AWS Global Accelerator is a service that improves the availability and performance of the applications with local or global users. It provides static IP addresses that act as a fixed entry point to the application endpoints in a single or multiple AWS Regions. AWS Global Accelerator uses the AWS global network to optimize the path from the users to the applications, improving the performance of the traffic by as much as 60%.

In this exercise, you use Global Accelerator to improve the traffic performance of a web application by optimizing the path from the users to the application using AWS global network.

Global Accelerator

The AWS Resource consumption for the exercise does not fall under AWS Free Tier.

Step1: Pre-Requisite


You need to have an AWS account with administrative access to complete the exercise. If you don’t have an AWS account, kindly use the link to create free trial account for AWS.

Step2: Create Role for the EC2 Instance


The first step is to create a role which is assigned to the EC2 instance hosting the web site. The role will enable using session manager from AWS Systems Manager to manage the instance remotely.

  1. Login to the AWS Console and goto IAM Management console.

  2. Click on the Roles menu in the left and then click on the Create role button.

    Global Accelerator

  3. On the next screen, select EC2 as the service and click on the Next: Permissions button.

    Global Accelerator

  4. On the next screen, select AmazonSSMManagedInstanceCore as the policy and click on the Next: Tags button.

    Global Accelerator

  5. On the next screen, click on the Next: Review button.

  6. On the next screen, type in dojoec2profile as the role name and click on the Create role button.

    Global Accelerator

  7. The role is created in no time. Launch EC2 instance in the next step.

Step3: Launch EC2 Instance


The EC2 instance profile or role is created. Let’s launch the EC2 instance which is used to host the web site.

  1. Login to the AWS Console. Select an AWS Region of your choice. You will see the exercise using the Ireland region.

  2. Goto EC2 Management Console. Click on the Instances in the left menu and then click on the Launch Instance button.

    Global Accelerator

  3. On the next screen, select Ubuntu Server 18.04 LTS (HVM), SSD Volume Type as the image and click on the Select button.

    Global Accelerator

  4. On the next screen, select t2.micro as the instance type and click on the Next: Configure Instance Details button.

    Global Accelerator

  5. On the next screen, select the default VPC for the network field. Select Enable for the Auto-assign Public IP. Select dojoec2profile for the IAM role field. Then click on the Next: Add Storage button.

    Global Accelerator

  6. On the next Add Storage page, leave everything to the default and click on the Next: Add Tags button.

  7. On the next screen, type in Name for the Key field and dojowebserver for the Value field. Click on the Next: Configure Security Group button.

    Global Accelerator

  8. On the next screen, type in dojohttpsecuritygroup for the Security group name and description fields. Update inbound rule for Type = HTTP, Protocol = TCP, Port Range = 80 and Source = 0.0.0.0/0. Click on the Review and Launch button. Ignore the warnings as we don’t need access beyond http protocol.

    Global Accelerator

  9. On the next Review Instance Launch page, click on the Launch button.

  10. On the keypair popup window, select Proceed without a key pair option. Check for the acknowledgement and click on the Launch Instances button.

    Global Accelerator

  11. The EC2 instance is launched. It will take couple of mins before the instance is completely ready. Wait till the status changes to 2/2 checks passed.

    Global Accelerator

  12. The EC2 instance is ready. Let’s install Apache Web Server on it.

Step4: Use Session Manager to Install Apache Web Server


In this step, you use Systems Manager - session manager to install Apache Web Server on the EC2 instance. Then this EC2 will work as the web site which we configure with Global Accelerator to improve the traffic performance.

  1. Goto Systems Manager Console. Click on the Session Manager in the left and then click on the Start session button.

    Global Accelerator

  2. On the next screen, select dojowebserver instance and click on the Start session button.

    Global Accelerator

  3. The session manager starts the session with the EC2 instance in separate browser window or tab.

    Global Accelerator

  4. Run the command sudo apt-get update to refresh your local software package database.

    Global Accelerator

  5. Run the command sudo apt-get install apache2 to install the Apache package on Ubuntu. Type-in Y, when it asks for the confirmation.

    Global Accelerator

  6. The Apache Web Server is now installed on the EC2 instance. Click on the Terminate button to close the session. Go back to EC2 management console and make note of the public IP address of the dojowebserver instance.

    Global Accelerator

  7. Access the Apache2 Ubuntu Default Page in browser using url - http://[ec2-public-ip].

    Global Accelerator

  8. The EC2 instance will be used as the web site to configure with Global Accelerator. Generally, you will have more than one web servers configured for auto-scaling behind the load-balancer. You will also use Route53 for the DNS mapping. But we are avoiding it to keep the cost minimum. The exercise will configure Global Accelerator with EC2 based web site but the configuration is not different from what you do with a load-balancer. The Next step is to configure the Global Accelerator.

Step5: Configure Global Accelerator


Amazon Global Accelerator is used to optimize the access path to the web application. The path uses AWS Global Network instead of internet network hopping to provide access to the web server. Such high-bandwidth and optimize path enhances the application response and user experience.

  1. Goto Global Accelerator management console. You create accelerators by using the console in the US West (Oregon) Region but AWS Global Accelerator is a global service that supports endpoints in a single or multiple AWS Regions. Click on the Create accelerator button.

    Global Accelerator

  2. On the next screen, type-in dojoaccelerator as the accelerator name and click on the Next button.

    Global Accelerator

  3. On the next screen, type-in 80 for the ports. Select TCP for the Protocol and click on the Next button.

    Global Accelerator

  4. On the next screen, select eu-west-1 as the region and then click on Next button.

    Global Accelerator

  5. On the next screen, click on the Add endpoint button.

    Global Accelerator

  6. On the next screen, select EC2 instance as the Endpoint type. Select dojowebserver EC2 instance as the Endpoint and then click on the Create accelerator button.

    Global Accelerator

  7. It will start the creation of the Global Accelerator. It will take some time. Wait till the status of the accelerator changes to Deployed. Make note of the DNS name as you need it to access the web application.

    Global Accelerator

  8. You now can access the web site using Global Accelerator and when you do so you are using AWS Global Infrastructure for the most of the path in place of internet network hopping. Use Global Accelerator DNS name to access the web application - http://[dns-name].

    Global Accelerator

  9. This was quick exercise to learn using Global Accelerator to improve web site / application performance by optimizing the traffic path. The exercise is complete. Follow the next step to clean-up the resources so that you don’t incur any cost post the exercise.

Step6: Clean up


Delete dojoaccelerator Global Accelerator in the Oregon region.

Delete the dojowebserver EC2 instance in the Ireland region or the region you choose for the exercise.

Delete the dojoec2profile IAM role.

Thanks and hope you enjoyed the exercise.


Back to the Exercises