[Pdns-users] [Pdns-dev] Question regarding backend threads in PDNS
Aki Tuomi
cmouse at youzen.ext.b2.fi
Wed Oct 30 07:18:47 UTC 2013
On Wed, Oct 30, 2013 at 06:31:19AM +0000, Seema Datar wrote:
>
> Hi All,
>
> I run PDNS with multiple backend threads. I need to introduce counters in the threads. I also need to flush those counters periodically to a data store. I was evaluating spawning another thread to periodically flush these counters to the datastore. The question is can I spawn another backend thread that does not necessarily implement all the interface methods (lookup, getSOA etc.). What will be a recommended way to achieve this?
>
> Thanks,
> Seema
If you don't mind some ruby/python, you can use remotebackend for this.
# file /etc/powerdns/handler.rb
require 'pdns/remotebackend'
class EmptyHandler < Pdns::Remotebackend::Handler
end
Pdns::Remotebackend::PipeConnector(EmptyHandler).run()
# eof
# file /etc/powerdns/pdns.conf
...
launch+=remote
remote-connection-string=pipe:command=/etc/powerdns/handler.rb
...
# eof
sparing any typos you should now have a backend thread that does not
respond to any queries other than "does not exist here".
you can now set it up to do other stuff as well.
Aki
> _______________________________________________
> Pdns-dev mailing list
> Pdns-dev at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20131030/9cbf24d1/attachment-0001.sig>
More information about the Pdns-users
mailing list