[Pdns-users] PowerDNS custom backend questions

thomas morgan tm at zerigo.com
Thu Dec 2 17:50:11 UTC 2010


On Nov 23, 2010, at 2:54 PM, Mihaly Zachar wrote:
> 1)
> It seems that I successfully disabled the cache by the config
> (cache-ttl, negquery-cache-ttl, query-cache-ttl) parameters.
> Can it be correct ?

Correct, set each to 0. Powerdns has some inefficiencies that are masked by the built-in caching, so you will likely see some queries hit your backend multiple times, for the same inbound DNS query. As long as your own caching makes up for this, or your volumes are low, it should be no problem.

> 2)
> I wrote a simple backend to see how PDNS opens/closes the backend
> threads and by having (distributor-threads=1) seems that PDNS opened
> only one distributor thread.
> If I answered back slowly from the backend, the subsequent queries
> always waited the answer.
> I found the following in the doc
> (http://doc.powerdns.com/backend-writers-guide.html):
> "PowerDNS may instantiate multiple instances of your backend, or destroy
> existing copies and instantiate new ones."
> I took a quick look into the source, but I did not really find anything
> where and why it would kill the backend thread.
> During my stress test and having "distributor-threads=1" seems that it
> did not destroy my thread after long time.
> Can you guys please clarify the above statement ?
> Can you please confirm that in this case PDNS will never kill my thread ?

For at least the pipe-backend, our experience is that powerdns will spawn distributor-threads + 1, where the + 1 is for TCP queries. I believe powerdns will kill the pipe backend process and relaunch it if the that process fails (times out or returns a FAIL response). 

I don't know whether this applies to custom, non-pipe-backends though. You might have to do some digging to differentiate how much of that is in the pipe-backend itself and how much is in the powerdns core.


More information about the Pdns-users mailing list