Discussion:
[Pdns-users] PowerDNS Master / Slave
Support Desk
2011-08-03 14:11:01 UTC
Permalink
I am looking into deploying two powerdns Servers on my Network. I would like
both to use a mysql cluster that I have setup as their backend. My question
is, if both servers are letting the MySql cluster do the replication, should
they both be configured as Masters?
Stefan Schmidt
2011-08-03 14:49:27 UTC
Permalink
Hi There,
Post by Support Desk
I am looking into deploying two powerdns Servers on my Network. I would like
both to use a mysql cluster that I have setup as their backend. My question
is, if both servers are letting the MySql cluster do the replication, should
they both be configured as Masters?
If the backend - in this case mysql - is doing the replication itself
we are calling it 'Native' mode.
You would only need to set master=yes in pdns.conf in order to enable
your name servers sending out DNS NOTIFY messages to all servers
mentioned as NS records for a zone that has changed recently. In Mysql
PowerDNS will then update the last notified_serial column of the
domains table in your database.
slave=yes will enable PowerDNS to listen to such NOTIFIES and if the
domain is of type 'SLAVE' it will then try to AXFR the zone and
subsequently update all entries in the records table.
Thus enabling either master or slave bears a slight risk that both of
your PowerDNS servers will try to update the same column at once.
I am not entirely sure how a MySQL cluster would handle this kind of
deadlock. Gracefully i'd hope.

Stefan
Ian Mordey
2011-08-05 18:03:44 UTC
Permalink
I have powerdns running perfectly using a MySQL cluster to store the data. The way I do it is have the pdns servers run a local copy of MySQL and replicate from the cluster. This eliminates downtime if the link between the geographically separate DNS servers and the master cluster is down. I don't have AXFR master/slave setup anywhere as any updates are made to the cluster table and this is replicated out to the local mysql instance.

Cheers
Ian
Post by Stefan Schmidt
Hi There,
Post by Support Desk
I am looking into deploying two powerdns Servers on my Network. I would like
both to use a mysql cluster that I have setup as their backend. My question
is, if both servers are letting the MySql cluster do the replication, should
they both be configured as Masters?
If the backend - in this case mysql - is doing the replication itself
we are calling it 'Native' mode.
You would only need to set master=yes in pdns.conf in order to enable
your name servers sending out DNS NOTIFY messages to all servers
mentioned as NS records for a zone that has changed recently. In Mysql
PowerDNS will then update the last notified_serial column of the
domains table in your database.
slave=yes will enable PowerDNS to listen to such NOTIFIES and if the
domain is of type 'SLAVE' it will then try to AXFR the zone and
subsequently update all entries in the records table.
Thus enabling either master or slave bears a slight risk that both of
your PowerDNS servers will try to update the same column at once.
I am not entirely sure how a MySQL cluster would handle this kind of
deadlock. Gracefully i'd hope.
Stefan
_______________________________________________
Pdns-users mailing list
http://mailman.powerdns.com/mailman/listinfo/pdns-users
Cristian Cappelletti
2011-08-16 13:47:40 UTC
Permalink
Hi all,
Post by Ian Mordey
I have powerdns running perfectly using a MySQL cluster to store the data. The way I do it is have the pdns servers run a local copy of MySQL and replicate from the cluster. This eliminates downtime if the link between the geographically separate DNS servers and the master cluster is down. I don't have AXFR master/slave setup anywhere as any updates are made to the cluster table and this is replicated out to the local mysql instance.
Cheers
Ian
I have the same implementation as described by Ian.

Now, I have to handle even the SLAVE zones, for our customers who prefer to
manage domains on their servers (AXFR master/slave setup). So I have to manage
NATIVE domains for those
customers that use our "DNS tool panel" and SLAVE domains for customers who have
a their own server that acts as a master.

In this scenario, the local 'records' table on two DNS servers would be written:
- by native replication from MySQL cluster for records of NATIVE zone
- by pdns daemon for records of SLAVE zone

... having as a result a misalignment of the 'records' tables on the local and
cluster MySQL instance.


Can I configure pdns to cache the "AXFR records" without saving them on local DB?

Or more generally, what is the best way to implement my scenario?


Kind regards,
Cristian

Loading...