[Pdns-users] PDNS and MySQL replication

AJ McKee aj.mckee at druid-dns.com
Tue Mar 13 23:24:17 UTC 2007


Hi Erol,

There are a number of things you can do to check how far the slave instance
is, but very little in terms of improving replication times bar the normal
network stuff. 

One thing I have set up is a simple PHP script that is a simple SOAP service
on the master. It simply returns the latest id field from both the domains
and records table. On the slave I have a cron job that calls the service
every few min. If it falls more than say 50 records behind, it trys to see
what the issue is (show slave status etc) and mails me the info. But of
course you could do this very easily.

I have read/heard/dreamt of another way before on this list I think.
Something to do with a mysqldump, rsync the difference and load it on
masters. Not too sure if I have that right. In principle this would work,
but would it scale well?

Most likely the load on the master has been the issue, and it has been too
busy to start the replication thread to the slave servers. I have found that
this can happen quite a bit. 

Simple things like placing the DB backends on their own separate lan/wan
links can help, but I am sure this is your case already. Make sure MySQL is
configured to only replicate the DB that you want it to replicate too.

You could consider using an in memory db as well, this can be very fast, but
there are obvious draw backs... power off and wallop, not to mention the
amount of ram you need. But you can of course replicate this too... ohhh the
options there are endless and messy. 

It's a difficult one to be honest, MySQL is very nice to use and quite fast,
but at times especially in terms of PDNS it sometimes cannot be fast enough
in terms of updates especially to multiple servers. Its an area I am
interested in so please let me know how you get on.

Cheers
AJ 






More information about the Pdns-users mailing list