You've just got done working with your IT team to lower your DNS's Time to Live (TTL) to 10 minutes prior to your launch. Today is the big day and everyone has been told the new site will be live at noon. You ask your IT team to update the Domain Name System (DNS) records at 11:50 a.m. to point to the new site. Everything seems like it's going great. Lots of excitement builds. Managers huddle around in anticipation. The clock strikes noon, and only one person sees the new site on their phone. Quick, clear your cache, everyone! Let's just give it a few more minutes...
It's 12:03 p.m., now three people can see it, but there're hundreds of other people that don't see your new site. Now you're starting to panic. You know the TTL was set to 10 minutes and the site should be live. What's going on? It's now 12:15 p.m. and now almost half of your team sees the new site. Closer, but still not ideal. Not until 12:25 p.m. does the entire office see the new site.
Now management is asking what happened? Why did the launch window get missed by 25 minutes? Thank goodness you lowered that TTL from 4 hours to 10 minutes, but still, why was that still so long? The answer? DNS propagation.
What is DNS Propagation?
In a previous blog, we talked about what DNS and TTL records are. In a nutshell, in order for your browser to retrieve data from the internet (such as a web page), it needs to locate that website's IP address, so the internet knows how to route you properly. It's like asking Siri for directions to Joe's house. In your contacts, Siri will find Joe, see that he lives at 246 Main Street in Chicago, IL, and then determines the most effective route to get you there. DNS is just like that contact list, except the list of contacts is extremely large. To save space, your computer only stores the contacts it most recently went to.
Continuing with this analogy, each of those contacts has an expiration date on it so it knows when it needs to ask for Joe's address again. When it's time to get Joe's contact information again, your computer will reach out to its main DNS server. If that server has a contact for Joe in its list and it hasn't expired, it will tell you what it has stored. If it doesn't have Joe's contact (or it's expired), it will either reach out to a Master (or "Root") server, or it will look up who is the owner of Joe's contact and reach out directly to them for the updated information. Once Joe's contact is found, it's passed down the chain and each server along the way stores a copy of it for future use, while setting and expiration date (TTL).
This process of going up the DNS chain to find a contact (DNS Record) is commonly known and DNS Iterative or Recursive queries. When the records expire all the way up and a new/updated record is pulled down, this is known as DNS propagation.
How does this affect my site launch?
In our opening example, the assumption was that your DNS record's TTL was the same as the time it would take for your computer to see the change. This is a very common misconception and unfortunately not accurate. You must also account for the time each of the DNS servers in the DNS iterative process (moving up the chain) takes to expire and to download the new record.
This can increase the time it takes to propagate by 2-4x the TTL time. Typically, as a request makes it way through this DNS lookup chain, the expirations are rarely just starting. They are either half-way expired, or could be almost out of time. In some cases, for sites which don't get much traffic, the DNS record hasn't been cached anywhere, so the actual Go-Live time is nearly instant. This is always the case for brand new DNS records, because there was never a chance for that record to get stored previously. In reality, I typically recommend clients plan on 2 to 2.5 times the TTL for a go live window. If you are able to lower your TTL to 5 minutes prior to the launch day, the actual go live should occur between 1 and 12 minutes or so. If you were only able to lower this to 30 minutes ahead of time, you may be looking at a deployment window of 1 to 75 minutes. During this window, users, one by one, will start to see the updated record which means they will begin getting the updated site delivered to their browsers.
The key to a successful launch is always proper expectations. Setting an exact time for something to go live is usually not possible if you are relying on DNS to make the site "Go-Live". However, with careful planning and preparation ahead of time, you can provide a small window of when users will see your updates and prepare management and your customers accordingly. If you have any questions or need help in planning your next upgrade, please let us know!