Recently, I’ve migrated my website’s Origin servers from an AWS ALB to AWS CloudFront. Since this move, we notice End-to-End load time for the user has increased by nearly 50%
My website users are mostly from Egypt and my AWS ALB was hosted in AWS region (Ireland), Now we have moved the origin to CloudFront with Price class (All Edge locations)
We had a look at what changed and looking at my CloudFront logs, i see the client IP (Cloudflare IP) is changing dramatically, Sometimes it’s from Australia COLO and sometimes from Japan
Comparing to the previous logs when our origin was the AWS ALB on Ireland, the Client IP (Cloudflare IP) was always from Ireland
I understand that Cloudflare will use Anycast to serve the user from the best location, but as confirmed by Cloudflare that all user requests are severed from the Optimal Location (mostly in Europe PMO or MRS )and the issue is that Cloudfront NS responds with a remote Cloudfront IP for our Origin
Did anyone had a similar issue with using Cloudflare with CloudFront or Can someone explains why Cloudfront will respond with a remote location, Is it an issue at Cloudflare DNS ? or CloudFront NS ?