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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인