Hello,
It seems that the DNS for image.tmdb.org
is misconfigured.
Usually host names pointing to CDNs have CNAMEs associated with it, but there's no CNAME with this domain. As a result, I get directed to a CDN that has a RTT of 134ms instead of 2ms to a local Cloudfront edge location.
I further tested this theory by manually setting the IPs to 65.8.0.30
, which is a common ECS anycast IP returned for many lookups concerning Cloudfront. Sure enough all images were being loaded from the nearest PoP.
I can't seem to upload screenshots here but I can explain this in more detail if needed.
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de Travis Bell
le 12 octobre 2021 à 12h40
Hi @agneev,
I can't speak to anything other than how CloudFront has you setup DNS records through the Route 53 UI. When you choose a DNS hostname with a CloudFront distribution, it's Route 53 that creates the alias record. It's all an integrated set of services you use their UI to create.
Is my current set of replied IPs, which seem to be my closest POP. CloudFront is returning the
SEA19-C2
edge for my requests, which is in Seattle. 50ms is about as good as I can expect given that I'm on Starlink and latency doesn't ever get a whole lot better than ~35ms.Réponse de agneev
le 13 octobre 2021 à 02h24
Hey Travis 👋
Cloudfront relies on ECS to steer clients to a closer PoP. Cloudflare doesn't support that. Google, OpenDNS are among a handful that do. Here's a site that shows this.
To give you an example of a Cloudfront image-serving domain that hits the local cache:
Comparatively,
image.tmdb.org
doesn't return any Cloudfront CNAMEs and seems to return the same set of IPs regardless of the DNS.Since the DNS isn't returning IPs from this PoP, there's misses from the PoP cache, so there's no point of creating a DNS rewrite as of now.
All other domains that use Cloudfront hit the local PoP. I'm not familiar with Route 53, but maybe there's a way you could enable ECS, if there's such an option?
Réponse de agneev
le 13 octobre 2021 à 02h39
I found a support article that might be helpful.
Réponse de agneev
le 30 octobre 2021 à 02h09
Hey @travisbell, don't mean to rush you but is there an update on this?
Réponse de Travis Bell
le 30 octobre 2021 à 11h33
Hi @agneev,
I suspect the reason you're not being forwarded to the POP you are expecting is the closest pop is because we are only paying for the "100" price class. The details on that are located here. We pay for POP's in North America, Europe and Israel.
If you run the same tests on
www.themoviedb.org
, are the results what you expect? We pay for the top price class onwww.themoviedb.org
, so it should perform differently thanimage.tmdb.org
.This hadn't occurred to me until I was reminded when I read through this support article.
Réponse de agneev
le 31 octobre 2021 à 01h40
Indeed Google DNS returns IPs for the local edge for
www.themoviedb.org
. I wasn't aware of Cloudfront pricing tbh.Réponse de Travis Bell
le 31 octobre 2021 à 11h03
Ok, perfect, happy to have been able to help figure this out.