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
> [email protected]
> http://mailman.powerdns.com/mailman/listinfo/pdns-dev

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users
_______________________________________________
Pdns-dev mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-dev

Reply via email to