NS Records - are they queried in order or randomly?

Hi all,

I'm trying to find the answer to a fairly simple question ( I think its simple ) - NS Records - are they queried in order or randomly?

For example, lets say a DNS query comes through for my domain, four nameservers are listed:
ns1.myDomain.com
ns2.myDomain.com
ns3.myDomain.com
ns4.myDomain.com

Will ns2, ns3 and ns4 only be queried if ns1 is down?

I'd remember reading that it was random and this method could be used to provide simple load balancing for the DNS queries.

Thanks in advance!
LVL 1
Mango-ManAsked:
Who is Participating?
 
sstone55423Commented:
No, not random order, round robin.  
ns1.myDomain.com
ns2.myDomain.com
gives ns1, ns2, ns1, ns2, ns1, ns2, etc.
 
For three ns, it would be ns1, ns2, ns3, ns1, ns2, ns3, etc.
I gave references supporting that on botj Windows and Bind DNS servers (about 98% of all DNS servers)
0
 
sstone55423Commented:
I am pretty sure they are of equal priortity, and so they round robin.
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
Mango-ManAuthor Commented:
Hi both,

Thanks for the responses - I may be wrong here but doesn't Round Robin ( and the link sstone55423 sent ) apply to HOST records within a domain?  ( so provide load balancing for the servers the host record resolves to as opposed to the actual nameserver them selves? )

What I'm trying to determine is if I have two name servers thus:

ns1.myDomain.com
ns2.myDomain.com

But ns2 is on a fairly poor internet connection, are 50% of the queries going to get a poor response OR is that name server only going to be queried if NS1 is down.

As far as I know this will not be specific to a platform ( Windows, BIND, etc ) because any flavour server returns all nameservers so it must be down to the querying server to choose from the list of options.

Or am I barking up the wrong tree completely?

I've upped the pointage of the question!
0
 
omarfaridCommented:
wheb answer is returned back to requester it is rotated by replying server in round robin fashion
requester will use the first one in the list unless it is not responding or TTL expire
0
 
sstone55423Commented:
Omar:  Which one is it?  You said it is rounbd robin, and then you said it was not.
 
I am pretty sure that NS record is round robin.  MX records are prioritized, and only round robin if they have the same priority.
0
 
Mango-ManAuthor Commented:
Thanks omarfarid,

So basically the DNS servers that a requestor needs to query (for A, CNAME, MX resolution, etc)  are returned in a random order?

Sorry - just trying to get a definitive simply answer!

Thanks again
0
 
omarfaridCommented:
yes
0
 
omarfaridCommented:
the responding dns server will use round robin while replaying to requesters queries which is random for the requesters.

if for example requester 1 request 1st time, reply may be sent like ns1, ns2, ns3
then if requester 2 request , then reply sent like ns2, ns3, ns1
then if requester 1 request 2nd time, reply sent like ns3, ns1, ns2

0
 
Mango-ManAuthor Commented:
sstone55423,

Thanks - I did see you references but the Microsoft one specifically seems to refer to Round Robin load balancing for host records ( which is a given ); ie:

multihomed   IN  A  10.0.0.1
multihomed   IN  A  10.0.0.2
multihomed   IN  A  10.0.0.3

My question is regarding the balancing between the name servers before you get to that point.
0
 
Mango-ManAuthor Commented:
Ultimately however I have my answer - the secondary DNS server is just as likely to get queried as the primary.

Thanks everyone!!
0
 
Mango-ManAuthor Commented:
Actually - just to clarify sstone55423,

You do know that I'm not talking about alias records right?

Sorry all - I'm giving advice to a client based on this so I need to be sure.

I'm upping the points and will split accordingly.
0
 
Chris DentPowerShell DeveloperCommented:

> You do know that I'm not talking about alias records right?

Alias records, that is CNAME records, cannot use Round Robin. Use of more one CNAME for the same resource is illegal.

But it is completely right to say that Round Robin applies to A Records, NS Records, and quite a lot of others (including PTR, SRV, TXT, etc, etc).

Chris
0
 
sstone55423Commented:
We all endeavor to get that "A" grade.  The "B" grade should only be given if someone answers only a portion of your question.  In this question it would seem that your question was answered completely, and with references to support the answer.
0
 
Mango-ManAuthor Commented:
Sorry sstone55423,

I'm haven't used EE since the grading system came in so I'm not sure what the standard is - I graded based purely on what I though reflected how easy was to get the answer.

I will re-think my grading in future.
0
 
Mango-ManAuthor Commented:
Do you know - Can I change the grade after I've accepted a solution?
0
 
omarfaridCommented:
you can request through the community zone to reopen the question and then change grade
0
 
sstone55423Commented:
I apologize, I didn't mean to give you a difficult time.  I meant it more as a gentle nudge.  It is not that big of a deal for one isolated support event.  Good luck with EE in the future, I hope that I will be able to assist you then.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.