High Latency from CloudFront to Non-AWS Origin

0

Hello,

I hope this message finds you well.

I am seeking assistance to improve the latency, or reduce ping times, between CloudFront and my non-AWS origin server located in Frankfurt. Despite enabling Origin Shield and selecting the nearest region, which is eu-central-1 (the same region as my server), I continue to experience high latency.

To provide you with more context, my origin server is not an AWS product. I would greatly appreciate any guidance or insights on how to optimize the connection and achieve lower latency.

Your help and expertise in this matter would be highly valuable. Thank you in advance for your assistance.

Best regards,

Jay

Jay
已提問 7 個月前檢視次數 213 次
2 個答案
0
  • Is it wire latency or app latency ?
  • What is the Origin IP/Prefix ? whois -h whois.cymru.com " -v <origin-ip>" --> this should give you the ASN, Prefix

curl -Iv https://<cloudfront-Alternate Name/ your hostname fronted by CF>

Response headers

HTTP/1.1 200 OK
Server: CloudFront
Date: 
Content-Type: 
Content-Length: 915
Connection: keep-alive
X-Cache: 
Via: 
X-Amz-Cf-Pop: BJS9-E1 --> Share this
X-Amz-Cf-Id:  --> Share this

Create a case with Support with above curl outputs and they should be able to assist you and check the latency between CF POP <<< >> Non AWS Origin

  • It's not secure to post your Origin details here and it's hard to assist without above information.
profile picture
bijay_k
已回答 6 個月前
0

Hello,

You may want to run the command to check which step do you see latency in:

curl -w "DNS_resolution: %{time_namelookup}| TCP_negotiation_time: %{time_connect}| SSL_negotiation_time: %{time_appconnect}| TTFB: %{time_starttransfer}| Total time: %{time_total} \n" -o /dev/null -vsL https://www.example.com

If CloudFront returns "X-Cache:Hit from cloudfront" in response, there is latency in the answer given back by Cloudfront itself, it doesn't send back to origin.

If, CloudFront returns "X-Cache:Miss from cloudfront" when the request is sent to the origin. You may want to turn on origin latency metric to know exact time origin took to send the first byte. Then, Check if sending a request from any frankfurt server to origin is causing latency. If, yes, latency is on origin side. To avoid latency caused by Cloudfront when forwarding requests to the origin, refer to : https://repost.aws/knowledge-center/cloudfront-latency-xcache

AWS
Ananya
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南