1

I would like to know which is the better option to transfer the domains & their updates between a master & slave PowerDNS server.

I have seen many old posts from 2006 saying using the MySQL replication way is better, but that was 8 years ago. So with the current PowerDNS version I would like to know which way is better the MySQL replication or AXFR method?

Cristian Ciupitu
  • 6,226
  • 2
  • 41
  • 55
Sayajin
  • 159
  • 2
  • 10
  • This question is largely subjective, but in general: you should stick to AXFR/IXFR where possible as they are product agnostic, and far more sane when trying to replicate over untrusted networks (i.e. the internet). – Andrew B May 11 '14 at 23:06

3 Answers3

3

Documentation says "Native replication is the default, unless other operation is specifically configured." ( http://doc.powerdns.com/html/replication.html ) By Native it is referring to a replication thats native to the backend you use where it does not need to take an active part in the process itself but just uses the data it is presented with. For most people MySQL Native thus usually means MySQL Replication although a combination of rsync and mysqldump technically could also be called that.

PowerDNS Server does not support incremental zone transfers (IXFR) but does employ AXFR. For really big zones that would mean increased network traffic between your nameservers. Also i don't have any experience with what happens when the Zone is bigger than available RAM. PowerDNS Server might choke then.

A AXFR Master/Slave can be setup with only the BIND Zonefile backend i.e. in 'traditional' BIND8/9-style, however if you are planning on deploying DNSSEC with PowerDNS a dnssec-capable backend such as MySQL will be necessary for the metadata and key storage.

Most people going for a pure PowerDNS Server setup are using Native (with MySQL) Replication, so this is also the topic on which most support information from PowerDNS Server users is available.

With MySQL replication chances to all of your nameservers are near instant which provides a smoother user experience if you let clients change their own zones/records for example via some web frontend to the database PowerDNS Server uses.

ZaphodB
  • 653
  • 3
  • 9
  • awesome tnx, will do MySQL replication then since after your explanation it just makes more sense for what I will be using it for. – Sayajin May 13 '14 at 19:15
0

Please note that MySQL is plain text over the line. So you need to encrypt to e.g. not leak your dnssec keys.

MySQL SSL is too much trouble (and you most likely need to compile it manually). MySQL over ssh tunnel - pita to setup. MySQL over anything else - there's the problem of keeping tunnel running and slave and master not disconnect each other.

The best solution is a mysqldump over scp. You can eliminate all issues with tunnels and master slave connections.

You can setup custom nanocron to do the sync every 10 seconds, at small db's it's nothing

Ajay
  • 61
  • 1
  • 6
0

I ended up using mysql galera cluster instead with all 3 power dns servers set as master, works like a charm

Sayajin
  • 159
  • 2
  • 10
  • This is not really an answer to your question. Please consider elaborating why you choose MySQL over AXFR. – Lukas Jul 06 '15 at 13:24
  • this was a year ago but if I do remember correctly it was because AXFR didn't always receive the record update. – Sayajin Jul 07 '15 at 14:23