Nysql topology

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Nysql topology

Graham White-5

I am a newbie to PowerDNS so bear with me. I am working on setting up two name servers, one as a master and one as a slave that will handle DNS for a potentially large number of domains. I’m not quite sure on the topology for the setup.

 

        If I understand correctly the recommended way of setting up a master and slave boxes is to have the master and slave connect to separate mysql backend servers with the master connecting to a primary mysql box and the slave connected to a second mysql box that is using mysql replication? If this is the case then I assume that I don’t need to configure master=yes  and slave=yes on the respective DNS boxes and any insert queries for a new domain would be:
 
insert into domains (name,type) values ('powerdns.com','NATIVE') 
 
which will of course be replicated on the respective mysql box. Is this correct?
 
--------------

            If I wanted to configure the more traditional master/slave setup using serial numbers do I still need two separate database backends for each nameserver? If so then on the mysql box that the master uses you do an insert on its database like so for a new domain:

insert into domains (name,type) values ('powerdns.com','MASTER');
 
while on the database server that the slave uses the insert statement would be:
insert into domains (name,master,type) values ('powerdns.com','213.244.168.217','SLAVE');
 
Is this correct? Then we can use serial numbers etc. According to the docs, by simply updating the serial number on a postgres backend will notify the slaves, is this true for mysql as well?

 

Thanks

 

G. White         

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Nysql topology

bert hubert
On Mon, Feb 24, 2003 at 02:05:47PM -0800, Graham White wrote:

> mysql box and the slave connected to a second mysql box that is using
> mysql replication? If this is the case then I assume that I don't need
> to configure master=yes  and slave=yes on the respective DNS boxes and
> any insert queries for a new domain would be:
> insert into domains (name,type) values ('powerdns.com','NATIVE')

Indeed, this is how we do it.

>             If I wanted to configure the more traditional master/slave
> setup using serial numbers do I still need two separate database
> backends for each nameserver? If so then on the mysql box that the
> master uses you do an insert on its database like so for a new domain:

You'd need two separate database names indeed.

> Is this correct? Then we can use serial numbers etc. According to the
> docs, by simply updating the serial number on a postgres backend will
> notify the slaves, is this true for mysql as well?

Generic MySQL and Generic PostgreSQL have identical code in PowerDNS and
work alike in all ways. And indeed, you'd then use notifications.

Let me know how I can help further.

Regards,

bert

--
http://www.PowerDNS.com      Open source, database driven DNS Software
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting