CloudFront Download Speed

0

A customer has a mobile application, where they store the Media files like Images, video and Audio. Currently it is all saved to a EC2 instance. Typically a 13 mb image file takes around 17 seconds. Using S3 bucket and CloudFront. They say it takes around 75 seconds for the same image to be downloaded. They are getting the download time for the media from Apple Simulator. They are planning to scale their web front-end and look to move static files to S3 and deliver via CloudFront.

  1. Is this is a right way to check the download speed
  2. Is there a way to optimize the speeds of downloading the assets.
AWS
asked 4 years ago655 views
1 Answer
0
Accepted Answer

The right way to test download speed is to do some real-user-monitoring - use real apps with real users on the real internet. 'Simulation' services tend to take synthetic measurements and won't provide real-world experience.

A simple way of doing this is to use Route53 weighted routing and a single domain name pointing to both EC2 and CloudFront, and then examine the logs for both using the time-taken field entry (in addition to any variation in errors). You could be more sophisticated but this would need adaption to the client application to make it's own measurements.

Generally, CloudFront should be faster than EC2 (unless your client is within the same EC2 region, for example) but there are many benefits to CloudFront over EC2 (cost, availability, DDOS-protection) that the customer should also take into consideration when comparing the two.

It's worth checking that the app supports HTTP/2 to CloudFront. If it doesn't support HTTP/2, it might get a better performance opening up multiple HTTP/1.1 range requests, possibly over multiple connections using different domain names, to parallelize the downloads.

Also don't disregard that It could also be a problem with CloudFront (the client is not being directed to the 'best' edge location, a problem with the server, etc), or a problem with the Internet connectivity between CloudFront and the client. If the customer thinks that is the case, they should raise a support case and include the request ID(s) which are sent in CloudFront HTTP requests to the origin, its responses to the client, and its access logs.

AWS
EXPERT
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions