DNS Caching and SOA Records

In this fast-paced world of technology, one technology that has not truly caught up is DNS.  People often forget changing a DNS entry may take hours before the results are seen.  Going live with a new website by changing the "www" DNS record could mean 24hrs of visitors split between both sites.

One trick you may consider is to reduce the TTL of your DNS zone.  Some DNS providers may not allow you to change this.  Better yet, some ISPs / DNS servers may ignore the value anway.  Also if you are paying on a per-M of query model, this can have costly effects.

For example, a TTL of 14400 seconds (or 4hrs) may be typical.  This means a local/corporate DNS server will cache the results for 4hrs before querying the configured upstream DNS server (ISP) again for the value.  Reducing the TTL will  reduce this caching time, but will create increased load of the NS servers for the domain.  Last thing you want to do is overload your NS servers causing them to fail entirely!

Using "dig" or "nslookup", you can easily query the SOA record for a domain to see what the TTL value is configured for.

dig SOA domain.com
nslookup -querytype=SOA domain.com

The last value returned is the TTL value, measured in seconds. 

Typically several days before we make a DNS change, we consider lowering our TTL to as low as 10minutes.  Several days after the change, we will go reset the TTL to the standard value.  Remember the decrease in TTL is inversely proportional to the increase in load on your NS servers.  E.g. reduce your TTL in half and you double the NS server load.