Ensure DNS records consistency between primary DNS servers

data-consistencydomain-name-systemsynchronization

Root DNS servers may be the most typical primary(not read-only) DNS servers. There are currently 13 IP addresses for root DNS servers; however, considering the IP anycast technology, more than 13 root DNS servers are deployed worldwide.

If someone wants to update a DNS record for all root DNS servers, is there some sync or replication mechanism between all these DNS servers?

More complex, if two people want to update the same DNS record simultaneously, how does DNS solve the potential conflict?

e.g., person A updated a DNS record r1 to r2 on a.root-servers.net.(deployed at region A), and at the same time, person B updated the same DNS record r1 to r3 on a.root-servers.net.(deployed at region B); moreover assuming there is significant network latency between region A and region B.

The second problem is similar to a database cluster in that there is more than one primary database server, and these primary servers sync data from all other primary servers.

Best Answer

To answer your first question : 'How DNS zones are synced between TLD DNS servers'

Root DNS servers and TLD DNS mechanisms are VERY different from lower level common DNS servers. In short, each TLD will have their own mechanisms for keeping servers in sync. They may use zone transfers, or they may have very specific scripts to sync and error-check zone data between all nodes.

And for your second question : 'How does DNS prevent conflicting updates'

This is handled in plain DNS protocol by having a DNS master which will receive or make changes to the zone data, but the rest of the DNS slaves will not have authority to change anything. Additionally the zone changes are tracked with a serial number in the SOA record. Authoritative DNS servers use this information to figure out if they are 'behind' and need to get a fresh copy of the zone.

Since there is really just 1 master for a given zone, it isn't really possible to have conflicting changes.