How can i run several PowerDNS backends at once?

Created by Stefan Schmidt
Keywords:
launch backends
Last updated by:
Stefan Schmidt

As described in http://doc.powerdns.com/modules.html - just not with so many words ;) - PowerDNS can launch any number of different or oven the same backends via the launch statement. Usually one would just do that in the configuration file pdns.conf instead of the command line.
Those backends will be exhausted for answers to your DNS query in the order in which they are given in the launch statement.
This does mean that if your first backend in line can answer the question, it will and if only the fourth in line can answer the question you will have the delay of the looping through the first three backends until PowerDNS will send out the answer.
It is therefore imperative that you make sure that your backends do answer _fast_ _enough_ where fast enough would be receiving and answer in <1s should be enough to be compatible with most recursive nameservers, however faster is better of course.
You can have a different prefix in front of your configuration options to the backend by giving it a name.

Here we go with an example pdns.conf configuration:

launch=gmysql:first,gmysql:second,pipe:third,bind:fourth
gmysql-first-host=127.0.0.1
gmysql-first-user=pdns
gmysql-first-password=secret
gmysql-first-dbname=pdns-firstdb

gmysql-second-host=127.0.0.1
gmysql-second-user=anotheruser
gmysql-second-password=anotherpassword
gmysql-second-dbname=pdns-seconddb

pipe-third-command=/etc/powerdns/pdns-ipv6-reverse-backend.py
pipe-third-timeout=500

bind-fourth-config=/etc/powerdns/named.conf