<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Slave operation</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PowerDNS manual" HREF="index.html"><LINK REL="UP" TITLE="Master/Slave operation & replication" HREF="replication.html"><LINK REL="PREVIOUS" TITLE="Master/Slave operation & replication" HREF="replication.html"><LINK REL="NEXT" TITLE="Master operation" HREF="master.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PowerDNS manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="replication.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 13. Master/Slave operation & replication</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="master.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="SLAVE" >13.2. Slave operation</A ></H1 ><P > On launch, PDNS requests from all backends a list of domains which have not been checked recently for changes. This should happen every '<B CLASS="COMMAND" >refresh</B >' seconds, as specified in the SOA record. All domains that are unfresh are then checked for changes over at their master. If the <A HREF="types.html#SOA-TYPE" >SOA</A > serial number there is higher, the domain is retrieved and inserted into the database. In any case, after the check the domain is declared 'fresh', and will only be checked again after '<B CLASS="COMMAND" >refresh</B >' seconds have passed. </P ><P > <DIV CLASS="WARNING" ><P ></P ><TABLE CLASS="WARNING" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/warning.gif" HSPACE="5" ALT="Warning"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > Slave support is OFF by default, turn it on by adding <B CLASS="COMMAND" >slave</B > to the configuration. The same holds for master operation. Both can be on simultaneously. </P ></TD ></TR ></TABLE ></DIV > </P ><P > PDNS also reacts to notifies by immediately checking if the zone has updated and if so, retransfering it. </P ><P > All backends which implement this feature must make sure that they can handle transactions so as to not leave the zone in a half updated state. MySQL configured with either BerkeleyDB or InnoDB meets this requirement, as do PostgreSQL and Oracle. The Bindbackend implements transaction semantics by renaming files if and only if they have been retrieved completely and parsed correctly. </P ><P > Slave operation can also be programmed using several pdns_control commands, see <A HREF="pdns-internals.html#PDNSCONTROL" >Section B.1.1</A >. The 'retrieve' command is especially useful as it triggers an immediate retrieval of the zone from the configured master. </P ><P > Since 2.9.21, PowerDNS supports multiple masters. For the BIND backend, the native BIND configuration language suffices to specify multiple masters, for SQL based backends, list all master servers separated by commas in the 'master' field of the domains table. </P ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="SUPERMASTER" >13.2.1. Supermaster automatic provisioning of slaves</A ></H2 ><P > PDNS can recognize so called 'supermasters'. A supermaster is a host which is master for domains and for which we are to be a slave. When a master (re)loads a domain, it sends out a notification to its slaves. Normally, such a notification is only accepted if PDNS already knows that it is a slave for a domain. </P ><P > However, a notification from a supermaster carries more persuasion. When PDNS determines that a notification comes from a supermaster and it is bonafide, PDNS can provision the domain automatically, and configure itself as a slave for that zone. </P ><P > To enable this feature, a backend needs to know about the IP address of the supermaster, and how PDNS will be listed in the set of NS records remotely, and the 'account' name of your supermaster. There is no need to fill this out but it does help keep track of where a domain comes from. </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="replication.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="master.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Master/Slave operation & replication</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="replication.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Master operation</TD ></TR ></TABLE ></DIV ></BODY ></HTML >