2

Upon setting up my zone files, I went back to review my TTL values. The default is set for 24 hours and I have individual TTL values set for each individual record.

My thought was NS, MX, and CNAME records should have a higher TTL value because they likely will not change often. Somewhere along the lines of 1wk seems appropriate and will offer less load on the server. The A records however, can have a lower value, lets say 12hrs.

My question is, if MX record mx1.example.com has a TTL of 1wk and mx1.example.com has A record of a.b.c.d which has a TTL of 12hrs, won't the client still query the DNS server every 12 hours to make sure the A record is current? Since DNS queries are minimal, is it worth having higher TTL values for NS, MX, and CNAME at that point?

0

There is typically a long tail for how long all clients take to move over to the new IP address, though shortening the TTL can help planned migrations. Some DNS servers have the ability to adjust the TTL on the fly as a planned migration timestamp approaches.

DNS probably isn't much of a bandwidth problem (unless you have an open DNS server being abused in a amplification attack), so the best TTL is probably a goldilocks problem of not being stupidly low, but not so high that if there is a need to migrate to a new IP address that migration time is minimized. Email typically will linger in queues for several days, plenty of time for a 12h or 24h TTL to expire, though some modern Internet applications expect faster delivery (e.g. "respond to this message within five minutes" sorts of things), and whether it is okay for those to break during a (possibly unplanned) migration might be good to clarify with your customers.

  • So its suggested to leave TTL at 12h or 24h across the board unless there's a planned migration or IP's need to be changed prior? – debuser14 Sep 3 '15 at 15:37
  • That would be a good starting point. – thrig Sep 3 '15 at 15:40
  • Ok, I'll go ahead with your suggestion and see how things roll out for my web site. This is simply a learning experience and not mission critical, so downtime isn't a factor as long as I can learn from what's happening. – debuser14 Sep 3 '15 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.