Looking for a house, 1.4 billion queries, PowerDNS crosses over

Posted by bert hubert Thu, 27 Apr 2006 19:31:00 GMT

We’ve been looking for a new house lately, but this has not been easy. The Netherlands has been experiencing a housing bubble for the past decade, so even a small house costs an arm and a leg. A number of possible places were sold in the brief period between making an appointment and actually going round to visit. Very frustrating.

1.4 billion queries

I started an endurance test some time ago to really stress out the recursor. This test has now reached 1.4 billion queries. This means we still have 3 billion queries to go to hit the magic 2^32.

PowerDNS 3.0.1 appears to hold up well. There are some small problems on big endian platforms (ultrasparc), which are solved in subversion, and I uncovered an obscure form of misconfiguration (having a nameserver with multiple IP addresses, one of them being lame) we didn’t deal with. Other nameservers don’t either, so it doesn’t really matter. See if you can resolve ‘www.nl.netherlabs.eu’. If you can, chances are you are running a very recent PowerDNS :-)

Crossing over

The PowerDNS recursor is a pure recursor, or at least, used to be. I literally spent years thinking (on and off) about how to make PowerDNS authoritative and recursive at the same time without losing the clean design and today I figured out how to do it.

It turned out the proper way is to insert a hook in the call that figures out the best nameserver to ask a question. If we are authoritative for a domain, we send back an empty nameserver which means ‘we know, don’t go out’.

When the time comes to go ask that nameserver, the emptiness is recognized, and a call is made to the ‘out of band’ resolver. This delivers a vector of DNSResourceRecords, just like a remote nameserver would. The rest of PowerDNS does not ‘know’ it is parsing self-generated data.

This has the downside that we cache our own data. But compared to the elegance of keeping the rest of the nameserver unchanged, this is a small price to pay.

In the same place, we can also insert a ‘forwarder’ nameserver, whereby we can point a domain towards an external authoritative nameserver.

Finally, built on the authoritative infrastructure, I added ‘–export-etc-hosts’. Quite a number of people have asked me if there were an easy way to have their recursor serve a small number of domains. There is an obvious place to get this data, /etc/hosts. ‘–export-etc-hosts’ does the obvious and generates full zones for each entry in /etc/hosts, making them available for all your clients.

This in turn means that a large number of people now have no reason anymore not to run the PowerDNS recursor, and benefit from its performance and superior anti-spoofing measures :-)

To test, head to this posting to the mailing list and download away!

Posted in , , ,  | 2 comments | no trackbacks

Comments

  1. Mirjam said 7 days later:
    Hello dear, I finaly blog as well (again)!
  2. hydrocodone said 163 days later:
    Hello all really cool blog alprazolam fioricet hydrocodone vicodin tramadol xanax valium ultram soma carisoprodol ambien ativan lorazepam propecia adipex didrex cialis levitra paxil meridia viagra wellbutrin clonazepam xenical prozac butalbital phentermine buy ativan buy adipex buy didrex buy levitra buy cialis buy phentermine buy soma buy tramadol buy diazepam buy carisoprodol buy meridia buy paxil buy valium buy xanax buy ultram buy fioricet tooth whitening online pharmacy alprazolam car insurance payday loan web directory business directory carisoprodol hydrocodone buy vicodin

Trackbacks

Use the following link to trackback from your own site:
http://blog.netherlabs.nl/articles/trackback/70

Comments are disabled