An accelerator can reduce the time it takes to reach a server, it does this by routing your network packets through to AWS global network (rather than going through the general internet).
Let’s create one
An accelerator also able to load balance and you can specify the weights/traffic dials (percentage of traffic that goes to each endpoints).
Configure the endpoint groups, I specified that 70% of traffic (Traffic dial) should go to my Singapore end group.
For each endpoint group I configure port overrides. Advantage of this is because in Linux for ports below to 1024 requires root privilege to run, I can use non root user to run services on higher ports. Running services as root is considered less secure (if the service gets cracked/hacked then the cracker/hacker will have root privilege).
You can also customize the health check parameters
Specify the endpoints in each endpoint group, here I am using EC2 instances, but they are other types you can choose from. I specified the same weight 128, which means I want traffic to be divided equally 50% 50% between the 2 instances.
Once created you can start testing.
On my instances, I have nginx running on port 80, 8080 and 8090.
Mine had a warning, I forgot to set the security groups to allow port 8080 and 8090. Let’s fix that.
Is client IP preserved?
After checking the nginx access logs, yes, client IP is preserved, which is good and as advertised.
However, even though I specified health checks to be done every 30 seconds. Seems like the health checks are a lot more frequent.
Unhealthy endpoints
Let’s see what is the behaviour of the accelerator when 1 or more endpoints are unhealthy. I stopped the nginx services on 2 of the Singapore instances.
The results are as expected, the accelerator will only choose the healthy endpoints. All good using any of the 2 accelerator IP addresses, the accelerator DNS name and Route53 DNS name.
AWS also provides a speed comparison tool so you can evaluate and see for yourself what are the speed improvements from where you are located. It is available on https://speedtest.globalaccelerator.aws/