[Pdns-users] pdns recursor - unthreaded vs threaded operation
sangiovanni at nweb.it
Fri Dec 30 08:40:20 UTC 2011
Hi Nils, thanks for your reply.
Database transactions help in terms of integrity, but they can do nothing about the order of data updates. If 2 threads work independently and execute the same update query on the db, I can't predict with certainty which one will occur first.
Il giorno 30/dic/2011, alle ore 00:32, Nils Breunese (Lemonbit) ha scritto:
> Fabio Sangiovanni wrote:
>> I'm a newbie of pdns and I'm setting up a recursor-only installation as local dns cache for a high load smtp server.
>> I'm using the lua scripting feature as a way to track down MX queries. In particular, the preresolve() function relies on luasql to execute queries on a (local) mysql database.
>> This is my problem: if I enable more than one thread in recursor.conf I get the lua script loaded more than once, and ultimately concurrent queries to the db that could mess up the stored data, depending on the execution order of select and update queries by the various threads.
>> I'd like to avoid circumventing these race conditions through complicated lua coding, and instead I'd prefer to keep things as simple as possible and limit the number of pdns threads to just 1 ("threads=1" setting in recursor.conf).
>> I know that the lua feature is not meant to be used this way, but this could really help me solving a big problem :)
>> Now my questions are:
>> am I right thinking this would solve my problem?
>> how deep is the impact on performances changing the number of threads from 2 (default setting) to just 1?
>> are there other sensible settings that I could adjust to better suit my needs?
> Wouldn't using database transactions solve your integrity problem?
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
More information about the Pdns-users