[Pdns-users] Intended use of multiple backends simultaneously.

Klaus Darilion klaus.mailinglists at pernau.at
Fri Jan 5 09:02:02 UTC 2018


Hi!

I do not understand in detail what you are trying to achieve. But when
using multiple backends, the answer is still coming only from one
backend - the one with the best matching zone.

e.g. backend 1 hosts test.test and backend 2 hosts test.test.test.

If there is a query for www.test.test.test PowerDNS will:
1. query backend 1 for a zone www.test.test.test. This will fail.
2. query backend 1 for a zone test.test.test. This will fail
3. query backend 1 for a zone test.test. This will succeed.

Hence, the current best-match is zone test.test on backend 1.

4. query backend 2 for a zone www.test.test.test. This will fail.
5. query backend 2 for a zone test.test.test. This succeed.

Hence, now the current best-match is zone test.test.test on backend 2.

Following, PowerDNS will try to answer the query for www.test.test.test
by using the zone test.test.test on backend 2.

If a zone is available on backend 1 and backend 2, it will use backend 1
to serve the query.

NOTE: I did some tests with multiple backends some time ago and there
were cornercases when PowerDNS did behave a bit strange. So, test a lot.

regards
Klaus






Am 30.12.2017 um 19:22 schrieb srinivas varadaraj:
> Hello, I have a question about the use of multiple backends and its
> intended use. Thank you in advance for your time and any guidance anyone
> can offer.
> 
> I have a use case as follows and am wondering if I am going about it the
> correct way.
> My setup :
> Zone name across the databases : test.test
> DB1entries: 10.0.1.1-10.0.1.50
> DB2entries: 10.1.1.1-10.1.1.10
> DB3entries: 10.2.1.1- 10.2.1.10
> 
> PDNS binds on one IP per instance.
> pdns instance1 : DB1, DB2
> pdns instance2 : DB1, DB3
> 
> 
>  Both pdns instances start without errors and I can see from the logs the
> connection to both databases and the queries being sent to both backends.
> 
> The problem I am having in both version 4.0.X and 4.1.X is that when I
> query the pdns server for AXFV or a simple A records, it only responds DB1
> entries.  But I can reverse the other as DB2, DB1 and it responds the DB2
> entries only and not DB1.
> 
> I have tried this with just mysql or postgresql backends and combinations
> of both backends.
> 
> In short I am trying simulate bind views but avoiding data duplication by
> splitting the data sets for the zone. There are no duplicates in the
> datasets.
> 
> What am I doing wrong or am I complicating the setup. Here are the options
> used in the pdns instances:
> 
> Instance 1:
> 
> 
> # Normal operation
> 
> launch=gmysql:first,gmysql:second
> 
> 
> # Database configuration
> 
> gmysql-first-host=127.0.0.1
> 
> gmysql-first-user=pdns
> 
> gmysql-first-password=
> 
> gmysql-first-dbname=pdns_common
> 
> gmysql-first-dnssec=yes
> 
> 
> gmysql-second-host=127.0.0.1
> 
> gmysql-second-user=pdns
> 
> gmysql-second-password=
> 
> gmysql-second-dbname=pdns_nonDRpublic
> 
> gmysql-second-dnssec=yes
> 
> 
> 
> # Common configuration settings for various instances
> 
> ################################
> 
> config-name=pdns_externalView
> 
> # daemon=no
> 
> local-address=10.0.1.31
> 
> local-port=53
> 
> master=yes
> 
> webserver=yes
> 
> webserver-address=10.0.1.31
> 
> webserver-port=40100
> 
> api=yes
> 
> 
> 
> # Zone transfer section
> 
> allow-axfr-ips=10.0.1.76
> 
> disable-axfr=no
> 
> 
> Instance 2:
> 
> # DR operation
> 
> launch=gmysql:first,gpgsql:fourth
> 
> 
> # Database configuration
> 
> gmysql-first-host=127.0.0.1
> 
> gmysql-first-user=pdns
> 
> gmysql-first-password=
> 
> gmysql-first-dbname=pdns_common
> 
> 
> 
> gpgsql-fourth-host=127.0.0.1
> 
> gpgsql-fourth-user=pdns
> 
> gpgsql-fourth-password=
> 
> gpgsql-fourth-dbname=nondrprivate
> 
> 
> # Common configuration settings for various instances
> 
> ################################
> 
> config-name=pdns_internalView
> 
> # daemon=no
> 
> local-address=10.0.1.32
> 
> local-port=53
> 
> master=yes
> 
> webserver=yes
> 
> webserver-address=127.0.0.1
> 
> webserver-port=40101
> 
> api=yes
> 
> 
> 
> # Zone transfer section
> 
> allow-axfr-ips=10.0.1.76
> 
> disable-axfr=no
> 
> 
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
> 


More information about the Pdns-users mailing list