I want to open a case with AWS Support to troubleshoot my Amazon CloudFront web distribution latency issues.
Resolution
Important: To open a technical support case, you must have an AWS Support Plan.
When you open a case with AWS Support to troubleshoot your CloudFront web distribution latency issues, provide the information for the following steps:
- Note the CloudFront request IDs for your requests with latency issues. To find the request IDs from the X-Amz-Cf-Id HTTP response header, use a command such as cURL. Or, find the request ID in the web distribution log file in your CloudFront access log.
- Record how long it takes the object to download from CloudFront and to download the object directly from the origin.
Note: For more information, see Use various origins with CloudFront distributions.
- Run the following cURL command to get the time difference between the two download methods:
curl -v -L --output /dev/null --silent --show-error --write-out 'lookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\npretransfer: %{time_pretransfer}\nredirect: %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n' 'CloudFront-DNS or origin-endpoint'
Note: Replace CloudFront-DNS with the CloudFront DNS, or replace origin-endpoint with the origin endpoint.
Important: If a browser can reproduce the issue, collect the related HAR file.
- Note the IP address from your DNS resolver for latency issues with a specific address. For instructions on how to find the public IP address of the DNS resolver, see How can I determine if my public DNS resolver supports the EDNS Client Subnet (ECS) extension?
- Collect the TCP Traceroute or MTR reports for the CloudFront DNS or IP and the origin endpoint. For example, your endpoint might be in Amazon Elastic Compute Cloud (Amazon EC2) or an Application Load Balancer.
To get the MTR report, run the following command:
mtr -rwzn <CloudFront-DNS or origin-endpoint>
Related information
Request and response behavior
How do I troubleshoot and reduce increased latency from CloudFront?