Before starting this article, you need to have basic knowledge about the DNS zones. They are the administrative partition of the Domain Name System (DNS). Inside the DNS zones, there you can see all the DNS records for a domain name. The way to move them from a DNS server to another is called a zone transfer. You will use it when you want to improve the availability and performance of your domain and add additional DNS servers.
What is a zone transfer?
The zone transfer is the way for DNS data duplication (DNS records) from one DNS server to another. This process of transferring DNS data could copy the whole DNS zone with all of its DNS records or modify only the differences from the last revision.
When we talk about a copy of the whole zone file, it is called Full zone transfer (AXFR). It is very useful when you are deploying more Secondary DNS servers in your network. You can get them straight up to date with a single zone transfer.
In case of updating only the differences, we call it Partial zone transfer (IXFR). This one saves resources because a lot less data needs to be transferred. Therefore, it will be lighter and faster.
Why does it exist?
Having a single primary authoritative DNS server is a huge risk. If it gets attacked and it experience downtime, nobody will be able to resolve your domain name. That could be a big problem, leading to losses.
The other problem with a single server is that it will need to handle all the load. This could slow it down, leading to unpleasant waiting and issues for your users.
Based on those 2 facts, it is obvious that you will need to have multiple authoritative name servers for redundancy and better performance.
To be able to move the DNS records from one server to another or to multiple servers, you need to perform a zone transfer. It is the method for duplicating files in the DNS.
When do you perform a zone transfer?
We can explore two situations and see when the zone transfer happens:
1. From the main DNS server to the Secondary DNS servers. Imagine you are an administrator, and you have updated different DNS records for your domain. Maybe you change the IP address. This is crucial data. You want that data to be updated on your Secondary DNS servers. You can provoke a zone transfer to the other servers. That way, you know that all of them will have the new DNS records.
2. When the Secondary DNS servers check the Primary DNS server. The SOA record that each zone has has various values. For example, one of them indicates a refresh rate. This indicates to the Secondary DNS servers when it will be time to check for changes. When the time comes, they will send their copy of the SOA record and compare it with the SOA of the Primary DNS server, and if it has a lower serial number, this will trigger a zone transfer. Depending on how much the difference in the serial number is and the network‘s settings, it could be a small IXFR transfer or a complete AXFR.
Ok, so now you know the basics of the zone transfer. It is the mechanism that makes DNS data replication possible, easy and fast.
You learned new terminology related to DNS. Good job!