[net-dns-users] Release candidate for Net::DNS 0.79

Dick Franks rwfranks at acm.org
Sun Aug 17 14:08:50 UTC 2014


On 16 August 2014 20:40, Doug Barton <dougb at dougbarton.us> wrote:

> On 8/15/14 1:49 PM, Dick Franks wrote:
>
>>
>> On 15 August 2014 15:38, Willem Toorop <willem at nlnetlabs.nl
>> <mailto:willem at nlnetlabs.nl>> wrote:
>> [snip]
>>
>>     ...  [Net::DNS::Resolver::Recurse] now also provides
>>     recursive resolving through the conventional query, search and send
>>     methods, enabling drop in replacement of Net::DNS::Resolver objects.
>>
>> Please bear in mind the additional load this imposes on DNS
>> infrastructure.
>>
>
> Can you elaborate a bit on what you mean by this?
>
> 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.
More importantly, the intermediate results are cached, which greatly
reduces the traffic to the root and top level servers.

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.

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.

    #!/usr/bin/perl -w
    #
    use Net::DNS;
    use Net::DNS::Resolver::Recurse;

    my $resolver = new Net::DNS::Resolver( debug => 1 );
    # $resolver = new Net::DNS::Resolver::Recurse( debug => 1 );

    my $packet = $resolver->send( 'dougbarton.us', 'MX' );

    __END__
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/net-dns-users/attachments/20140817/e052afb6/attachment.htm>


More information about the net-dns-users mailing list