[Pdns-dev] PowerDNS 4, Remote and threading

Viktor Velchev ngshosting at gmail.com
Sun Sep 11 20:27:06 UTC 2016


Hello,

Thank you for the reply. I agree that PowerDNS launches several backend
threads and they handle requests concurrently. When using Remote,
especially with ZeroMQ, it sends a single request regarding a domain and
will wait for an answer for that specific domain, since the REQ/REP pattern
is not able to send() new queries before it receives data. In this
scenario it is not possible to write a recipient back-end that connects
through remote and handles several requests synchronously.


On Sun, Sep 11, 2016 at 10:44 PM, Aki Tuomi <cmouse at youzen.ext.b2.fi> wrote:

> On Sun, Sep 11, 2016 at 06:23:05PM +0300, Viktor Velchev wrote:
> > Hello,
> >
> > I am running PowerDNS 4.0.1, which is complied from source with ZeroMQ
> > support in a Debian 8 environment. I am experimenting with Remote and I
> am
> > willing to write my own DNS storage (back-end), which connects to
> PowerDNS
> > through Remote. Changelogs for the newer PowerDNS versions do not give
> any
> > hints regarding the bellow described problem, so I think it is safe to
> > assume that the case will be the same with all available 4.0.x releases.
> >
> > I am launching a single Remote instance and several threads:
> > launch=remote
> > distributor-threads=4
> > receiver-threads=4
> >
> > Receiver and distributor thread count is just an example, the point is
> that
> > I am not running in single threaded mode.
> >
> > The main problem is that Remote itself does not give me any options to
> > create a multi-threaded back-end. I have checked the source and although
> > ZeroMQ is configured to start two I/O threads, but the implemented
> REQ/REP
> > pattern limits the communication to:
> >
> > 1. PowerDNS sends a request about a domain.
> > 2. PowerDNS waits (blocks) until it receives data about the domain.
> >
> > Once my back-end receives a request I am limited to either returning
> false
> > or replying.
> > I am pretty sure that the case is the same with the Unix socket
> connector.
> > I have NOT checked if the case is the same with the HTTP connector.
> >
> > My questions are:
> > 1. Is there a possibility to modify the communication pattern, so that
> > PowerDNS either submits multiple requests through Remote OR maybe add a
> > command which asks for a new query while the previous one is being
> executed?
> > 2. In case I have myself misunderstood the way PowerDNS operates, is
> there
> > a Remote connector which is suited for use in cases where the recipient
> > wants to handle multiple requests at a time?
> >
> > Best Regards,
> > Victor
>
> Usually powerdns launches several backend threads, each working in blocking
> mode. Thus you will have concurrent requests running despite remotebackend
> only doing one request at a time.
>
> Aki
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20160911/abc9c4a7/attachment.html>


More information about the Pdns-dev mailing list