Anycast answers incoming queries based on where they are in the network (usually striving for as few hops as possible). GeoDNS answers each query different based on the querying client’s IP address.
GeoDNS has been around for a few years, but it has only recently started to become popular –on the verge of crucial– for global businesses. You most likely have used GeoDNS before, albeit unintentionally, if you have ever used a video streaming service.
If you have friends in other countries, you’ve probably noticed that you don’t always have the same shows or movie available on your streaming service. That’s because these apps use GeoDNS defined rules to permit/deny access to content depending on the user’s location.
GeoDNS rules cause records to return different answers based on the IP address, location, or network of the querying client.
Let’s say you have a TV show that premieres this week in the United States but won’t premiere in Europe until next week. You would want to create two region defined rules that send users to different endpoints depending on their location.
First, you would want to create a rule that points your US traffic to wherever you are streaming the videos. But for your users in Europe, you may want to restrict access and maybe even drop all European queries.
Just from the basic example above, you may already be seeing some of the differences. Let’s look at this from a network point of view.
Anycast allows you to deliver information by the “one to many” method. That means any DNS records you create (or change) are passed through your network to many geographically diverse endpoints called authoritative name servers.
When a user queries your domain, they will be answered by the closest (in network hops) authoritative name server, which will point them to the end point you specified in the record.
Anycast networks are comprised of dozens of endpoints, usually multiple authoritative name servers in each region of the world. CDN services and DNS hosting providers use Anycast networks to deliver information/content faster and more reliably. That’s because Anycast technology automatically calculates the closest server to the end-user. Usually, the more endpoints in an Anycast network will increase redundancy and reduce latency between end-users and your network edge.
Anycast backbones have become a standard for web-facing organizations, especially those with global or even regional audiences.
While Anycast is a great and affordable way to deliver content on a global scale… it lacks specificity. That’s where GeoDNS comes in. As we saw in our examples earlier, you can create rules that send users to unique endpoints based on their location.
In the illustration above, we are routing users in Europe to a different end-point. Alternatively, you can also deny access to your domains by dropping all queries. This is also a quick way to prevent malicious users from accessing your domains.
Want more use cases? Check out our interactive white paper: How GeoDNS Works.
GeoDNS tends to also deliver more accurate answers than Anycast, which (in some cases) can reduce resolution times. As we mentioned earlier, Anycast automatically answers traffic with the closest server. But how is that calculated if Anycast doesn’t know the user’s location? Instead, Anycast determines “distance” based on the least number of network hops between the user and server. GeoDNS overcomes this by routing end users based on their physical location. This reduces latency and increases accuracy when creating granular routing rules.