[Pdns-dev] My Backend Getting called multiple times

Ruben d'Arco cyclops at prof-x.net
Fri Nov 16 08:29:47 CET 2012


Hi Nikhil,

This is by design. PowerDNS will try to get the soa record to see if it is authorative for the domain. It will also try to move up to the root to see if a backend is authorative for that. If it is, it will continue with the actual records it needs.
Also, for things like CNAME and MX, it will try to resolve those as well.

So, it is normal and canot be avoided. Just implement the fuctions as described in the backend writers guide and powerdns does the rest for you!

Regards,
     Ruben

Nikhil Bose <nikhilbose11 at gmail.com> wrote:

>Hi All,
>
>First of all thanks for the help provided. As Peter in one of my
>earlier
>queries gave me a pointer and following that it is quite trivial to
>create
>our own Backend in PowerDNS and using getRemote(), I was able to
>retrieve
>the Client's resolver IP.
>
>PowerDNS is indeed quite simple to extend. Thanks for this
>architecture.
>
>I have one problem though. My backend is getting called multiple times.
>Even though I just send a single query using the host command.
>Just to show I put some output statements and these are printed after I
>sent the client query
>
>Here's the console output:
>
>***************************************************************************************
>Nov 16 11:20:26 Creating backend connection for TCP
>Constructor called
>% Nov 16 11:20:26 [bindbackend] Parsing 1 domain(s), will report when
>done
>Nov 16 11:20:26 [bindbackend] parsing 'example.com' from file
>'/etc/bind/example.com.zone'
>Nov 16 11:20:26 [bindbackend] Done parsing domains, 0 rejected, 1 new,
>0
>removed
>Constructor called
>Nov 16 11:20:26 About to create 3 backend threads for UDP
>Constructor called
>Constructor called
>Constructor called
>Constructor called
>Constructor called
>Constructor called
>Nov 16 11:20:26 Done launching threads, ready to distribute questions
>Nov 16 11:20:35 Distributor misses a thread (4<5), spawning new one
>looked up
>looked up
>looked up
>looked up
>Constructor called
>Constructor called
>***************************************************************************************
>
>How I can reduce this to a single lookup() call from the PowerDNS to my
>Backend?. Even constructor is called many times. Can this be configured
>anywhere?
>
>Thanks,
>Nikhil.
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Pdns-dev mailing list
>Pdns-dev at mailman.powerdns.com
>http://mailman.powerdns.com/mailman/listinfo/pdns-dev

--
Regards,
          Ruben


More information about the Pdns-dev mailing list