[Pdns-users] Multiple Backends Precedence?

Stefan Schmidt zaphodb at zaphods.net
Wed Dec 29 23:01:14 UTC 2010


On Wed, Dec 29, 2010 at 10:45:24PM +0000, Jonathan Thorpe wrote:
> Hi All,

Hi Jonathan and All,

> What I'd like to achieve is this:
> 1. Attempt to resolve the requested record from the MySQL backend.
> 2. If a record doesn’t exist, attempt to resolve it using the custom (piped) backend.
> 
> I see that PDNS supports multiple backends, but it's not clear as to whether or not there's some form of precedence that takes place in resolving the records.
...
> I'd prefer to use the custom backend as the last resort for these records and use the MySQL backend by default.

-> http://doc.powerdns.com/modules.html
This part of the documentation was not instantly clear to me initally either
but Bert Hubert confirmed that it works just the way you'd want it.
All the backends specified in the launch= setting are exhausted for the query
exactly in the order that they are listed. The first backend to give back an
answer will break that chain.
So if you put the following in your pdns.conf:

launch=gmysql:backend1,pipe:backend2
gmysql-backend1-host=127.0.0.1
gmysql-backend1-user=user
gmysql-backend1-password=password
gmysql-backend1-dbname=database
pipe-backend2-command=/path/to/backend
pipebackend-abi-version=2

it will just do what you want.

	Stefan, who is using that right now fÃŒr #27c3 ;-)
-- 
"Those people who think they know everything are a great annoyance to those of
us who do."
- Isaac Asimov



More information about the Pdns-users mailing list