Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1515
  • Last Modified:

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!
0
Mango-Man
Asked:
Mango-Man
  • 7
  • 6
  • 4
  • +1
3 Solutions
 
sstone55423Commented:
I am pretty sure they are of equal priortity, and so they round robin.
0
 
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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
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
 
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
 
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

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

  • 7
  • 6
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now