News for hackers. Stuff that matters.
Re:What is a CDN? How do CDNs work? by capableweb on Wednesday February 08, 2023 @05:39AM (#34706419)
> That’s done by DNS. The DNS server examines your DNS query and sends you back an IP address answer that’s “close” to the requesting IP address.

Is this really true? Last time I was dealing with load-balancing and DNS queries, DNS was simply "round-robbing" the replies, giving you back a random record basically of the ones replied. So if you have three A records with different IPs, each query will give you back one of them, but not depending on the location.

Maybe things have changed since I last dealt with it, but the DNS ecosystem doesn't tend to move very fast so I'm doubtful...

Re:What is a CDN? How do CDNs work? by pjc50 on Wednesday February 08, 2023 @06:15AM (#34706650)
The DNS server doesn't have to return the same responses to every query. It can geolocate the address making the request and use that to determine the respone.

https://easydns.com/features/geo-dns/

(Having said that, I tried my toy site on cloudflare free tier from the UK and it gave me San Francisco IPs, so presumably they only do this for large enough customers)

Re:What is a CDN? How do CDNs work? by capableweb on Wednesday February 08, 2023 @06:35AM (#34706777)
> It can geolocate the address making the request and use that to determine the respone

It can, but it tends to be a premium feature of specific DNS providers, not a global/by-default feature of DNS as efitz seems to be alluding to.

DNSimple supports it for example, but only on their "Professional" plan (and they call it "Regional Records") while others like Gandi don't support it at all.

Re:What is a CDN? How do CDNs work? by strken on Wednesday February 08, 2023 @06:58AM (#34706932)
If CDN providers are dealing with BGP you'd think they would also run their own DNS servers. I think you can do it with BIND views, from memory.
Re:What is a CDN? How do CDNs work? by jonathantf2 on Wednesday February 08, 2023 @07:30AM (#34707167)
I think that all of Cloudflare's IPs are GeoIP'd to their main office, like how Google's are. You can see the POP you're hitting here: https://<your url>/cdn-cgi/trace under colo. I think that Cloudflare use Anycast instead of geodns though.