Content delivery networks seem to be getting quite popular recently and I expect they will grow even more throughout this year, I plan to make a post just on these in the next few weeks. However if you are looking at CDN networks (as I am now) you will see a few of them offer something called AnyCast for your DNS requests and you might be wondering what this is exactly. The simplest way to understand what AnyCast does for DNS is first to understand how the internet normally works, and how it’s been adapted to provide an AnyCast service.
The internet is largely based around the border gateway protocol (BGP), this is how a large internet company such as a data center will connect to another networks such as an internet service provider. For redundancy, capacity and costing reasons a company such as a data center will (normally) always have multiple connections to the internet. The internet works by using unique addresses which are assigned to specific networks (IP Addresses), much like your home address is unique to you. Networks will announce their unique address space to the internet and other networks will learn the route to them, however as we have multiple entry points onto the internet there are multiple paths in and out of our network.
From the perspective of a remote network that means you might (and normally always do) get two or more routes/paths to a destination network where you want to send data. The BGP protocol will therefore pick the path it thinks is the best one, for simplicity we will say as standard that is going to be the closest (basically the idea). Normally this means if your hosting is in the UK but a visitor is in the US they will go over the shortest path to the UK. However that’s still not really short having to go all the way to the UK, this is where AnyCast comes into play.
So we have seen that you can announce the same network out of multiple places onto the internet, therefore if you announce the same address out of your UK and USA network people should then be sent to the closest provider for that network. That is the concept of AnyCast, your just using the old theory of how the internet works but to provide a faster service for clients. Now just imagine servers been placed all around the word with the same network and function.