<div dir="ltr"><div class="gmail_extra">
<br><br><div class="gmail_quote">On 16 August 2014 20:40, Doug Barton <span dir="ltr"><<a href="mailto:dougb@dougbarton.us" target="_blank">dougb@dougbarton.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">On 8/15/14 1:49 PM, Dick Franks wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">
<br>
On 15 August 2014 15:38, Willem Toorop <<a href="mailto:willem@nlnetlabs.nl" target="_blank">willem@nlnetlabs.nl</a><br></div><div class="">
<mailto:<a href="mailto:willem@nlnetlabs.nl" target="_blank">willem@nlnetlabs.nl</a>>> wrote:<br>
[snip]<br>
<br>
... [Net::DNS::Resolver::Recurse] now also provides<br>
recursive resolving through the conventional query, search and send<br>
methods, enabling drop in replacement of Net::DNS::Resolver objects.<br>
<br>
Please bear in mind the additional load this imposes on DNS infrastructure.<br>
</div></blockquote>
<br>
Can you elaborate a bit on what you mean by this?<span class=""><font color="#888888"><br>
<br>
</font></span></blockquote></div>Net::DNS::Resolver sends a single query to the default nameserver, with the RD bit set, which then does whatever queries are needed to find the answer.<br></div><div class="gmail_extra">More importantly, the intermediate results are cached, which greatly reduces the traffic to the root and top level servers.<br>
<br></div><div class="gmail_extra">Net::DNS::Resolver::Recurse performs all the necessary queries itself, with RD bit not set, and only a rudimentary cache which is discarded after each query. The result of the priming query to find the root nameservers is retained indefinitely.<br>
<br></div><div class="gmail_extra">Try running the following code fragment and watch what happens. Then uncomment the recursive resolver line. This is a simple example; missing glue records produce much more complicated behaviour.<br>
<br> #!/usr/bin/perl -w<br> #<br> use Net::DNS;<br> use Net::DNS::Resolver::Recurse;<br><br> my $resolver = new Net::DNS::Resolver( debug => 1 );<br> # $resolver = new Net::DNS::Resolver::Recurse( debug => 1 );<br>
<br> my $packet = $resolver->send( '<a href="http://dougbarton.us">dougbarton.us</a>', 'MX' );<br><br> __END__<br><br></div><div class="gmail_extra"><br></div></div>