Howdy, Stranger!

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

Subscribe to our newsletter

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    How Does DNS query ns servers.
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

    How Does DNS query ns servers.

    MunMun Member without signature
    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.

      Serving you the best VPS, Web hosting, dedicated servers and more - Cloud Shards | Query Foundry
      We operate the network AS62638 | Available in Syd AU and Dallas, Los Angeles and NYC USA
    • MunMun Member without signature

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

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

      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.

      Retired!

    • MunMun Member without signature

      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, Provider
    • @gbshouse said: maybe start with reading RFCs etc to understand whole process ...

      Thanks. I was waiting for your answer in this thread

    • MunMun Member without signature

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