There can be no doubt that internet connectivity has become a utility we can’t live without. The way we work, live, and play all increasingly rely on fast, reliable connections to the internet.
Facilitating these connections is the DNS (Domain Name System). Every time someone makes a request to an online service or website, DNS servers are there to translate human-readable domain names (www.netactuate.com) into machine-readable IP addresses (126.96.36.199). Resolving an entire URL from the “www” to the “.com” requires requests and responses from numerous types of DNS servers.
While we won’t deep dive into that entire process in this blog, this article does a good job of breaking it all down in detail. Suffice it to say that there can be seven or more separate requests and responses – all from different servers – required to resolve a single URL.
In this blog, we’ll first learn exactly what border gateway protocol (BGP) anycast is, and then take a look at how anycast makes resolving these numerous requests fast and seamless. If you were able to get to and read this article quickly and easily, you can probably thank several anycast DNS servers.
What is BGP anycast and how is it different from other network technologies?
In the early days of DNS, a method called unicast was used. With unicast, a single DNS server, or point of presence (PoP) is responsible for delivering responses for every single query that comes to it, no matter where in the world the request is sent.
So, if a unicast DNS server is in the central United States, and you are making a request from France, you have to wait until your request and response traverse all the networks in between. End users that are in and around the United States probably had decent performance. But end users further away experienced slow performance, or even requests that completely timed out.
One way to combat this performance issue is to add more servers at more locations around the world. This can help greatly, but can add to infrastructure complexity very quickly. Load balancers and other tools are often needed to make sure the users in France are connecting to the DNS server in France and not elsewhere.
This is where BGP comes in to help simplify DNS. With BGP anycast, each server broadcasts the same IP address – unlike unicast, where each server broadcasts a different IP. With anycast, users accessing the anycasted IP address to resolve their DNS queries will be routed to the location closest to them on the network.
How does anycast DNS work?
Using anycast DNS, incoming DNS queries are routed much more efficiently. Unlike unicast DNS, where every query goes to a single server, anycast DNS routes incoming queries to multiple servers that have been placed in different geographical locations.
Like we mentioned earlier, each anycasted DNS server is configured to broadcast the same IP. When an incoming DNS query is made, a DNS resolver sends the request to the closest anycast DNS server on the network. These DNS resolvers are often operated by the local internet service provider (ISP).
How does it know which location is the closest on the network? Border Gateway Protocol (BGP), a dynamic routing protocol, allows internet service providers to share information to determine the most efficient paths for data packets that make up the query. For a path to be chosen, it must be the shortest number of network “hops” away. (A data packet “hops” every time it changes networks to get to its destination.)
Every time a query is made, BGP makes sure the data packets take the shortest and fastest route available. This means every request is sent to the server that will provide the lowest latency. It also checks to make sure the server is available. If the closest location is offline or unavailable, BGP will determine the next nearest server to send the request to.
What are the benefits of anycast networking for DNS providers?
Nearly every DNS provider today, from the largest top-level domain providers to smaller, targeted service providers, leverages anycast. DNS resolvers must be highly available and extremely fast to provide seamless experiences for end users – especially given how many queries it takes to resolve a single URL.
Here’s a few of the benefits that anycast brings DNS providers, and keeps domain names resolving quickly and reliably.
Lower latency and faster response times
The time it takes for a DNS query to be resolved is known as latency. Latency can have a really big impact on internet speed and user experience. If latency is low, everything is loading fast and seamlessly, high latency means things are laggy, slow, and frustrating.
Anycast significantly reduces latency for large groups of DNS servers. Because each query is answered by the server that is the fewest hops away, the response times are as fast as they can be. Short response times means URLs are resolved quickly, making online experiences smooth and seamless.
Load balancing to improve reliability
Because requests are directed across multiple servers, anycast DNS effectively serves as a load balancer. This keeps any one server from becoming overloaded with requests, especially during peak traffic times. If one server does happen to become overloaded, anycast will route future DNS queries in that region to the next nearest available server. This enables a DNS service to never truly be unavailable. Users will still have continuous access, even if it is slightly higher latency than if their closest location was available.
Built-in DDoS attack mitigation
Distributed Denial of Service (DDoS) attacks have been around for a long time, and they only continue to rise in their amount and sophistication. According to Cloudflare, the most recent trend is thought-out, tailored, and persistent waves of DDoS attack campaigns on various fronts. DDoS attackers overwhelm servers with a massive influx of requests, causing major service disruptions.
Similar to the way Anycast DNS helps load balance incoming traffic, it also mitigates the impact of DDoS attacks. By spreading traffic across multiple servers as each request comes in, it makes it harder for any one server to get overloaded. In the case one server does go offline, the requests will continue to be serviced by the remaining, nearby available servers.
Without anycast networks, resolving domain names would be a slow and spotty process. Anycast enables DNS providers to simplify their architecture, and route incoming requests based on proximity and performance. This reduces latency and delivers a much better browsing experience for end users around the world.
Anycast also makes DNS services much more reliable and resilient. By providing built-in DDoS mitigation and load balancing, the likelihood of an entire service going down completely becomes much lower. Given how many requests it takes to resolve a single URL, this becomes even more important as DNS services scale globally.
If you are a DNS provider, and would like to learn more about custom, flexible anycast services, contact the engineering team at NetActuate today at netactuate.com/schedule-a-call or by calling +1-919-381-5400.