Does the order of dns servers affect sites performance?
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
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.
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
@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
, to increase entropy to defend against attacks. always choose a server randomly
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 -
-- David