Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How Does DNS query ns servers.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How Does DNS query ns servers.

MunMun Member
edited April 2013 in General

Okay, this is going to tax some of your brains, but here we go.

Lets say I have 4 ns records for a said subdomain(s). When a dns server queries to get these record(s) it is sent a list of ns records from my upper level ns server, cloudflare. It then queries said ns record(s) and gets an answer for A or AAAA.

My question is do modern dns servers query NS via a round robin, or do they query all to decrease look up times / test to see which is the best / closest host?

I.e. the dns server already has the ns records, and it now needs to look up the exact subdomain A or AAAA record. How does it make its choice on what to query for said subdomain record.

Comments

  • It seems that (from my googleing) that each time a DNS query is sent to the host the IP in the response is rotated, giving a diffrent record to each question given to the dns server. IDK how true this is, but here you go:

    http://en.wikipedia.org/wiki/Round-robin_DNS

  • From my knowledge authoritative DNS are queried in random. If one fails, recursive DNS would query another authoritative DNS server.

    NS records determin the DNS zone's authoritative DNS servers. When there is more than one NS record the DNS queries go randomly to all servers.

    source

  • @Mun said: My question is do modern dns servers query NS via a round robin, or do they query all to decrease look up times / test to see which is the best / closest host?

    It has to be round robin. If it does what you've described then it's Anycast.

  • MunMun Member

    wouldn't there be an advantage of query all, and then which one ever has the fastest response use?

  • @concerto49 said: Anycast.

    Anycast is a concept at the IP level afaik, not at the application level (DNS). If so, then doing anycast DNS would be absolutely pointless...

    @Mun said: wouldn't there be an advantage of query all, and then which one ever has the fastest response use?

    Is a waste of traffic.

  • MunMun Member

    A waste of traffic? How much traffic do you get on your DNS servers? I mean like ~12 gigs a month is how many queries?

  • Also Which NS records take priority? the 4 you set at your registrar or the 5 you set in NS records?

  • @Mun said: A waste of traffic? How much traffic do you get on your DNS servers? I mean like ~12 gigs a month is how many queries?

    Dunno, then ask to the creators of the protocol why works like this.

  • @Mun said: A waste of traffic? How much traffic do you get on your DNS servers? I mean like ~12 gigs a month is how many queries?

    you're doing it wrong if your DNS is using ~12gb of bandwidth.

  • MunMun Member

    it isn't, I was trying to point out the fact that it doesn't even use that much bandwidth.

  • @Mun said: Okay, this is going to tax some of your brains, but here we go.

    Try: dig +trace yourdomain AAAA (or whatever record type) to see it walk the path. Use dig +trace @ns to start directly with ns in the chain to see what happens.

  • MunMun Member

    thanks unused, seems that it is round robin. Sorta what I thought.

  • @concerto49 said: It has to be round robin. If it does what you've described then it's Anycast.

    I thought it was a more-or-less random selection. Though with 3 nameservers I see a consistent pattern:

    ns1 handles the most queries
    ns2 handles fewer
    ns3 handles the least

    @bdtech said: Also Which NS records take priority? the 4 you set at your registrar or the 5 you set in NS records?

    The 4 you set at the registrar are the only ones used. AFAIK :)

  • @sleddog interesting so registrar takes priority over dig NS?

  • gbshousegbshouse Member, Host Rep

    @bdtech - maybe start with reading RFCs etc to understand whole process ...

    or watch this http://www.youtube.com/watch?feature=player_embedded&v=vZ007Vi5HIM

  • @gbshouse said: maybe start with reading RFCs etc to understand whole process ...

    Thanks. I was waiting for your answer in this thread

  • MunMun Member

    @gbshouse, I understand that. Just wasn't sure what the current thinking process of how to find said address was in modern servers. I looked at a ton of google searches, and because it is such on odd request very few informative answers came up.

Sign In or Register to comment.