[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pdns-dev
Subject:    Re: [Pdns-dev] Question regarding backend threads in PDNS
From:       Aki Tuomi <cmouse () youzen ! ext ! b2 ! fi>
Date:       2013-10-30 7:18:47
Message-ID: 20131030071847.GA14328 () pi ! ip ! fi
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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@mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-dev


["signature.asc" (application/pgp-signature)]

_______________________________________________
Pdns-dev mailing list
Pdns-dev@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic