I have opened a case with AWS Support to troubleshoot CloudFront web distribution latency performance. How do I generate information for the AWS Support team to most effectively troubleshoot this issue?

The AWS Support team is much better equipped to diagnose your issue when you provide specific information about your CloudFront distribution.

Gather and provide the following information as soon as you begin working with AWS Support:

  1. From the location experiencing latency issues, access the AWS Support testing tool at http://d7uri8nf7uskq.cloudfront.net/JsCustomerTesting.html and provide the GUID returned by the tool.
  2. Provide the physical location of the computer that is downloading content.
  3. Create a file with the following contents:

         time_namelookup: %{time_namelookup}\n
         time_connect: %{time_connect}\n
         time_appconnect: %{time_appconnect}\n
         time_pretransfer: %{time_pretransfer}\n
         time_redirect: %{time_redirect}\n
         time_starttransfer: %{time_starttransfer}\n
         ----------\n
         time_total: %{time_total}\n

    Save the file with the name "curl.breakdown". Depending on the operating system that you are using, collect the output of the following commands and provide the results to the AWS Support engineer.

    Windows
      • Download WinMTR or any other MTR client for Windows and run it against your CloudFront web distribution.
      • Download Curl for Windows, open a command prompt to the folder where curl is located, and run the following commands:
         curl –v http://mydistributionid.cloudfront.net/myobjectthatisreallyslow.html -w "@curl.breakdown" -o NUL
    Note: Replace the URL http://mydistributionid.cloudfront.net/myobjectthatisreallyslow.html with the appropriate URL for your CloudFront web distribution.
         nslookup resolver-identity.cloudfront.net
    (As an alternative to using nslookup, you can browse to http://whatsmyresolver.stdlib.net/ and save the results for analysis.)

    Linux/MAC
    Run the following commands from a command prompt:
         sudo mtr --no-dns mydistributionid.cloudfront.net
         curl -v http://mydistributionid.cloudfront.net/myobjectthatisreallyslow.html -w "@curl.breakdown" -o /dev/null
    Note: Replace the URL http://mydistributionid.cloudfront.net/myobjectthatisreallyslow.html with the appropriate URL for your CloudFront web distribution.
         dig resolver-identity.cloudfront.net
    (As an alternative to using dig, you can browse to http://whatsmyresolver.stdlib.net/ and save the results for analysis.)
  4. Provide the difference in time between how long it takes to download the object from CloudFront compared to downloading directly from the origin.
  5. Provide the extent to which your CloudFront web distribution latency is a result of DNS resolver latency. To measure DNS resolver latency, configure a test machine to use alternative DNS resolvers such as OpenDNS or Google Public DNS.

    CloudFront automatically routes requests for your content to the nearest edge location. It uses the IP address of the DNS resolver that is making the DNS query for the content and a truncated version of the client's external IP address added to the DNS request using the EDNS-Client-Subnet extension to the DNS protocol. CloudFront then tries to make more informed decisions about how to connect you to the most optimal server. With more intelligent routing, you should benefit from reduced latency and increased throughput.

    The latency from the DNS resolver to the CloudFront edge dictates where client requests land. That is why different DNS resolvers might yield different IP addresses in your distribution. Google DNS and Open DNS both support the EDNS extension. Trying different resolvers can mitigate performance bottlenecks caused by DNS name resolution.

Amazon CloudFront, latency, diagnose, X-Amz-Cf-Id, web distribution, troubleshoot


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2015-12-09