[Pdns-users] pdns recursor - unthreaded vs threaded operation
Fabio Sangiovanni
sangiovanni at nweb.it
Thu Dec 29 08:55:57 UTC 2011
Hello list,
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?
Thanks a lot for your support.
Cheers,
Fabio
More information about the Pdns-users
mailing list