Jump to content

How does DNS work for websites and services delivered by data centers around the globe?

I know what DNS is. It's a server with a database that indexes all the websites' domains and their IP addresses. Typically these are owned by ISPs, and there are public DNS's offered by Google, Cloudflare etc (I have a question about these too). Services like YouTube, are hosted by multiple datacenters around the globe and the contents (in this case, videos) are delivered through what are called Content Delivery Networks. This network is basically a network of data centers placed strategically around the globe to serve the users. The definition I made above of the DNS server, only makes sense if there's only one server for a website. How do the DNS servers know, that it should return the IP address from Mumbai and not the one in Dublin? I witnessed my professor changing the nameserver IP address of our college website from our registrar account. Is there an ability to add multiple nameservers, for multiple data centers? Does the DNS point to the geographically nearest IP address?

 

And also, how does the same thing work for DNS servers? If I want to use, CloudFlare DNS, I have to update my DNS server to 1.1.1.1. (Is there a registrar available to reserve fancy looking IP addresses as well?) I'm from India, and my dns requests are routed through cloudflare's data centers in Mumbai (according to this). And I've seen some instances when it was routed through Singapore. You just give a static IP, how in the hell is that routed dynamically around the globe?

Link to comment
Share on other sites

Link to post
Share on other sites

To put the main question of "how does one IP get served locally around the globe" it comes down to what's called an Anycast address. The same IP can be served out of multiple locations and the fastest to respond is what's used by the end host, similar to how multiple DHCP servers work on a network but instead using just one IP. Of course there are load balancers that sit infront of all this and then balance that load across multiple servers and other network infrastructure as well so it's not just one large server that's responsible for that role but an infrastructure that can appear to be behind a single address per data center (almost like a reverse NAT).

 

https://www.cloudflare.com/learning/dns/what-is-anycast-dns/

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×