Does the order of dns servers affect sites performance?

Hi,

I would like to start using linode's dns servers for a web site.

Almost all of the sites visitors are from Europe and I would like for them to be querying the fastest possible dns server and that is ns5.linode.com according to simple ping checkup.

If I input the dns servers for my domain so that ns5.linode.com is the first one, does it make the visitors browser make the query to go to the ns5 server or do they go to the primary dns server that is the ns1.linode.com?

Or is there anycasting going on?

5 Replies

Linode's authoritative DNS servers don't use anycast.

The thing is, authoritative DNS servers are used in an arbitrary order. It doesn't matter what order you put them in in your zone file.

Linode's DNS servers shouldn't be that bad for Europe. Still, if every ms of DNS performance is critical for some reason – which it more or less shouldn't be -- it might be worth using a more Europe-focused service.

While I don't have a reference handy, I believe that most of the major caching resolvers in use nowadays (certainly at levels such as ISPs) will also track the most responsive authoritative servers, so it shouldn't be too important how you order your information, and even without anycast, most caches should end up preferring the nearest or best performing server.

And of course, depending on your TTL it's not like the caches likely being used by most of your customers have to actually go to your authoritative servers all that frequently.

As mnordhoff notes, you can't really control the actual order anyway - even the top level root servers will change (round-robin or randomize) response record order over time. Plus there's no requirement that clients use the records in the order they receive them (which is good, since it lets resolvers behave as in the prior paragraph).

– David

@db3l:

While I don't have a reference handy, I believe that most of the major caching resolvers in use nowadays (certainly at levels such as ISPs) will also track the most responsive authoritative servers, so it shouldn't be too important how you order your information, and even without anycast, most caches should end up preferring the nearest or best performing server.

This is straying off-topic, but Google Public DNS specifically does not do this. They always choose a server randomly, to increase entropy to defend against attacks.

@db3l:

… I believe that most of the major caching resolvers in use nowadays (certainly at levels such as ISPs) will also track the most responsive authoritative servers …

Quite right. At the top of the page:

Google Books: Pro DNS and BIND

–deckert

@mnordhoff:

This is straying off-topic, but Google Public DNS specifically does not do this. They always choose a server randomly, to increase entropy to defend against attacks.
Probably still more-or-less relevant in terms of performance when using Linode DNS servers. Besides, it's interesting information… I know BIND introduced RTT banding at some point, but is rolling it back in a upcoming release to an older mechanism that keeps a preference, with occasional randomness, so not completely random as Google seems to be.

Then again, it looks like Google counter-balances that with a lot of work to help ensure their cache actually satisfies the query - especially the prefetch processing - https://code.google.com/speed/public-dn … l#prefetch">https://code.google.com/speed/public-dns/docs/performance.html#prefetch - even in the absence of client queries. True, very lightly used names may not get into the prefetch queue so would be subject to random server selection on cache miss, but I expect on the whole it's still probably not that critical or worth the effort to attempt to control the server selected for the end user. And of course, just having a large enough TTL helps minimize cache misses even further.

-- David

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct