Iterative DNS query faster than recursive query due to more entries cached in Iterative DNS query











up vote
1
down vote

favorite












In an iterative DNS query, requests made by the local DNS server to the root, TLD and authoritative servers can be cached inside the local DNS. Whereas in the recursive query, only the specific hostname to IP address can be cached in local DNS server. Does this mean that iterative DNS queries are faster since it contains more entries cached in the local DNS server ?



If that is not the case would there be a difference between the two methods.










share|improve this question







New contributor




calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote

    favorite












    In an iterative DNS query, requests made by the local DNS server to the root, TLD and authoritative servers can be cached inside the local DNS. Whereas in the recursive query, only the specific hostname to IP address can be cached in local DNS server. Does this mean that iterative DNS queries are faster since it contains more entries cached in the local DNS server ?



    If that is not the case would there be a difference between the two methods.










    share|improve this question







    New contributor




    calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      In an iterative DNS query, requests made by the local DNS server to the root, TLD and authoritative servers can be cached inside the local DNS. Whereas in the recursive query, only the specific hostname to IP address can be cached in local DNS server. Does this mean that iterative DNS queries are faster since it contains more entries cached in the local DNS server ?



      If that is not the case would there be a difference between the two methods.










      share|improve this question







      New contributor




      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      In an iterative DNS query, requests made by the local DNS server to the root, TLD and authoritative servers can be cached inside the local DNS. Whereas in the recursive query, only the specific hostname to IP address can be cached in local DNS server. Does this mean that iterative DNS queries are faster since it contains more entries cached in the local DNS server ?



      If that is not the case would there be a difference between the two methods.







      networking dns cache






      share|improve this question







      New contributor




      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 20 at 8:25









      calveeen

      456




      456




      New contributor




      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      calveeen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          In recursive DNS query, the client only sends the query to the first DNS server.
          The server, if it cannot answer, will send the request to next server and so on,
          until the query is resolved.
          Here the DNS client requires that the DNS server respond to the query,
          so the burden is on Server to resolve the query.



          In iterative DNS query, the client is responsible for sending the query to successive
          servers, until the query is resolved by hitting a server that is authorized for
          the domain name (or until an error or time-out).
          Here the burden is on the client to resolve the query.



          I don't think that there is a big difference in speed between the two,
          except that a DNS server that is high enough in the hierarchy will likely
          have available a faster Internet connection than the client.



          For the iterative DNS query, the client will end up with having the successive
          intermediate DNS servers in its cache, but I don't see how it may use this
          to advantage.



          In more detail, these are the four most common answers a DNS server can provide:





          • Authoritative - a positive answer returned to the client with the Authoritative Answer (AA) bit set in the response.


          • Positive - an answer that contains the resource record (RR) or list of RRs that match the query.


          • Referral - an answer that contains a list of alternate servers the client can use to resolve the name. This type of answer is given if Recursion is not supported.


          • Negative - this answer indicates that an Authoritative server reported that the name (or record type) does not exist in the DNS name space.


          In the Iterative query, the client sends a query to the server.
          If recursion is disabled, and the server cannot answer the query,
          the server will respond with a Referral answer.
          The client will then use that information to query another DNS server.
          This process will continue until a server responds with an Authoritative or
          Negative response, or until the client runs out of time.






          share|improve this answer





















          • I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
            – calveeen
            Nov 20 at 14:27










          • As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
            – harrymc
            Nov 20 at 14:36











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          calveeen is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376895%2fiterative-dns-query-faster-than-recursive-query-due-to-more-entries-cached-in-it%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          In recursive DNS query, the client only sends the query to the first DNS server.
          The server, if it cannot answer, will send the request to next server and so on,
          until the query is resolved.
          Here the DNS client requires that the DNS server respond to the query,
          so the burden is on Server to resolve the query.



          In iterative DNS query, the client is responsible for sending the query to successive
          servers, until the query is resolved by hitting a server that is authorized for
          the domain name (or until an error or time-out).
          Here the burden is on the client to resolve the query.



          I don't think that there is a big difference in speed between the two,
          except that a DNS server that is high enough in the hierarchy will likely
          have available a faster Internet connection than the client.



          For the iterative DNS query, the client will end up with having the successive
          intermediate DNS servers in its cache, but I don't see how it may use this
          to advantage.



          In more detail, these are the four most common answers a DNS server can provide:





          • Authoritative - a positive answer returned to the client with the Authoritative Answer (AA) bit set in the response.


          • Positive - an answer that contains the resource record (RR) or list of RRs that match the query.


          • Referral - an answer that contains a list of alternate servers the client can use to resolve the name. This type of answer is given if Recursion is not supported.


          • Negative - this answer indicates that an Authoritative server reported that the name (or record type) does not exist in the DNS name space.


          In the Iterative query, the client sends a query to the server.
          If recursion is disabled, and the server cannot answer the query,
          the server will respond with a Referral answer.
          The client will then use that information to query another DNS server.
          This process will continue until a server responds with an Authoritative or
          Negative response, or until the client runs out of time.






          share|improve this answer





















          • I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
            – calveeen
            Nov 20 at 14:27










          • As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
            – harrymc
            Nov 20 at 14:36















          up vote
          0
          down vote



          accepted










          In recursive DNS query, the client only sends the query to the first DNS server.
          The server, if it cannot answer, will send the request to next server and so on,
          until the query is resolved.
          Here the DNS client requires that the DNS server respond to the query,
          so the burden is on Server to resolve the query.



          In iterative DNS query, the client is responsible for sending the query to successive
          servers, until the query is resolved by hitting a server that is authorized for
          the domain name (or until an error or time-out).
          Here the burden is on the client to resolve the query.



          I don't think that there is a big difference in speed between the two,
          except that a DNS server that is high enough in the hierarchy will likely
          have available a faster Internet connection than the client.



          For the iterative DNS query, the client will end up with having the successive
          intermediate DNS servers in its cache, but I don't see how it may use this
          to advantage.



          In more detail, these are the four most common answers a DNS server can provide:





          • Authoritative - a positive answer returned to the client with the Authoritative Answer (AA) bit set in the response.


          • Positive - an answer that contains the resource record (RR) or list of RRs that match the query.


          • Referral - an answer that contains a list of alternate servers the client can use to resolve the name. This type of answer is given if Recursion is not supported.


          • Negative - this answer indicates that an Authoritative server reported that the name (or record type) does not exist in the DNS name space.


          In the Iterative query, the client sends a query to the server.
          If recursion is disabled, and the server cannot answer the query,
          the server will respond with a Referral answer.
          The client will then use that information to query another DNS server.
          This process will continue until a server responds with an Authoritative or
          Negative response, or until the client runs out of time.






          share|improve this answer





















          • I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
            – calveeen
            Nov 20 at 14:27










          • As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
            – harrymc
            Nov 20 at 14:36













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          In recursive DNS query, the client only sends the query to the first DNS server.
          The server, if it cannot answer, will send the request to next server and so on,
          until the query is resolved.
          Here the DNS client requires that the DNS server respond to the query,
          so the burden is on Server to resolve the query.



          In iterative DNS query, the client is responsible for sending the query to successive
          servers, until the query is resolved by hitting a server that is authorized for
          the domain name (or until an error or time-out).
          Here the burden is on the client to resolve the query.



          I don't think that there is a big difference in speed between the two,
          except that a DNS server that is high enough in the hierarchy will likely
          have available a faster Internet connection than the client.



          For the iterative DNS query, the client will end up with having the successive
          intermediate DNS servers in its cache, but I don't see how it may use this
          to advantage.



          In more detail, these are the four most common answers a DNS server can provide:





          • Authoritative - a positive answer returned to the client with the Authoritative Answer (AA) bit set in the response.


          • Positive - an answer that contains the resource record (RR) or list of RRs that match the query.


          • Referral - an answer that contains a list of alternate servers the client can use to resolve the name. This type of answer is given if Recursion is not supported.


          • Negative - this answer indicates that an Authoritative server reported that the name (or record type) does not exist in the DNS name space.


          In the Iterative query, the client sends a query to the server.
          If recursion is disabled, and the server cannot answer the query,
          the server will respond with a Referral answer.
          The client will then use that information to query another DNS server.
          This process will continue until a server responds with an Authoritative or
          Negative response, or until the client runs out of time.






          share|improve this answer












          In recursive DNS query, the client only sends the query to the first DNS server.
          The server, if it cannot answer, will send the request to next server and so on,
          until the query is resolved.
          Here the DNS client requires that the DNS server respond to the query,
          so the burden is on Server to resolve the query.



          In iterative DNS query, the client is responsible for sending the query to successive
          servers, until the query is resolved by hitting a server that is authorized for
          the domain name (or until an error or time-out).
          Here the burden is on the client to resolve the query.



          I don't think that there is a big difference in speed between the two,
          except that a DNS server that is high enough in the hierarchy will likely
          have available a faster Internet connection than the client.



          For the iterative DNS query, the client will end up with having the successive
          intermediate DNS servers in its cache, but I don't see how it may use this
          to advantage.



          In more detail, these are the four most common answers a DNS server can provide:





          • Authoritative - a positive answer returned to the client with the Authoritative Answer (AA) bit set in the response.


          • Positive - an answer that contains the resource record (RR) or list of RRs that match the query.


          • Referral - an answer that contains a list of alternate servers the client can use to resolve the name. This type of answer is given if Recursion is not supported.


          • Negative - this answer indicates that an Authoritative server reported that the name (or record type) does not exist in the DNS name space.


          In the Iterative query, the client sends a query to the server.
          If recursion is disabled, and the server cannot answer the query,
          the server will respond with a Referral answer.
          The client will then use that information to query another DNS server.
          This process will continue until a server responds with an Authoritative or
          Negative response, or until the client runs out of time.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 at 13:12









          harrymc

          248k10257546




          248k10257546












          • I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
            – calveeen
            Nov 20 at 14:27










          • As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
            – harrymc
            Nov 20 at 14:36


















          • I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
            – calveeen
            Nov 20 at 14:27










          • As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
            – harrymc
            Nov 20 at 14:36
















          I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
          – calveeen
          Nov 20 at 14:27




          I see would the local DNS server in the iterative version contain more intermediate DNS entries leading which allows the DNS to bypass root servers for example ?
          – calveeen
          Nov 20 at 14:27












          As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
          – harrymc
          Nov 20 at 14:36




          As far as I know, clients may keep caches of results but not of DNS servers. I don't know of any client that caches DNS servers, and it seems to me that a client will always start with a query to the defined network DNS server and will not try itself to function as a DNS server.
          – harrymc
          Nov 20 at 14:36










          calveeen is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          calveeen is a new contributor. Be nice, and check out our Code of Conduct.













          calveeen is a new contributor. Be nice, and check out our Code of Conduct.












          calveeen is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376895%2fiterative-dns-query-faster-than-recursive-query-due-to-more-entries-cached-in-it%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?