Sign In

Internet Performance Delivered right to your inbox

Nameserver Romeo & Juliet: How Recursive Servers Fall in Love

Romeo & Juliet

Does love at first sight exist? Many have pondered that question. For recursive servers at ISPs around the world, the answer is yes, but only for a day.

It’s a love story for the ages and it’s responsible for a large part of the performance of the Internet.

What is a recursive server?

Recursive DNS servers are responsible for making DNS requests, usually on behalf of local ISPs around the world. An end user types example.com into their browser, but if it’s the first time they’ve done that or the first time they’ve done that in a while, the browser actually has no idea where in the world example.com is. Recursive servers perform this search based on their behalf.

The full DNS lookup begins by the recursive (think of Romeo looking for his Juliet) looking for example.com. To do this, it queries the dot at the end of example.com. This dot corresponds to the root servers of the Internet. The root servers don’t know the answer but they do know where .com is. They provide that information back to the recursive and it queries the CCTLDs or TLDs for example.com. The TLDs also don’t know the answer but they do know who is authoritative for example.com.

Finally, the recursive queries the authoritative nameservers for example.com and are provided an answer.

Here’s where the chemistry starts to build.

Once the recursive server knows which nameservers are authoritative, it actually checks the time it takes each to respond to a query and identifies the fastest one using Round Trip Time banding. This process is known as “nameserver priming”.  Think of it as that awful speed dating your friends talked you into.  Some you click with immediately and wanted to see again but then you got stuck with the crazy one who ran out the time talking about cats.

Anyway, once the nameserver with the fastest response time is identified, requests are routed there continually over a 24 hour period as long as it remains the fastest to respond.  This is called “nameserver affinity”.  The recursive server has fallen in love!  Over the next 24 hours, the affinity expires and this process is repeated.  Love at first response and it happens every single day! (Insert crowd noise of “Awwwwww” here).

Besides being an awesome Internet infrastructure love story, how else does this process affect clients outsourcing their managed DNS?

It largely has to do with clients looking for extra redundancy that utilize multiple DNS providers with one acting as primary and the other acting as secondary or “slave”.  In a primary/secondary configuration, the nameservers of each provider are all listed in the delegation at your registrar. So during nameserver priming, the recursive server checks the response times of each nameserver for each managed DNS provider. The fastest one wins.

This affects the distribution of traffic as the fastest provider will likely receive a larger part of the traffic, even if it’s the secondary in the configuration of the zone file.

So what does this have to do with redundancy?

If for some reason, one provider were to slow down or fail completely, the recursive would then try the next fastest nameserver in the delegation and so on. Think of this as that stretch of time after a break up when you’re texting all of your exes who are still in your phone.

More nameservers in the delegation to send requests to can mean extra redundancy, but keep in mind that more nameservers isn’t always better. You need redundancy and performance at each point of presence around the world no matter what. That’s where Dyn comes in.

Our Managed DNS platform is responsible for some of the fastest response times in the world. Our nameservers have the kind of swagger that drives the recursive crazy! With 100% enterprise uptime since our inception, we can keep this love story going, only without the tragic ending.

Who knew the backbone of the Internet was so Shakepearean-esque?


Share Now

Whois: Ryan Kimball

Ryan Kimball is the Manager of Technical Support at Dyn, the world leader in Internet Performance Solutions that delivers traffic management, message management, and performance assurance. Follow Dyn on Twitter, Facebook and YouTube.