30

Any disadvantage to short DNS TTL?

5
  • DNS or IP TTL...? – Izzy Jan 24 '11 at 4:30
  • Shorter than what? – John Gardeniers Jan 24 '11 at 4:33
  • 1
    Ok, the question has been changed to say "short", rather than "shorter", but that still begs the question of what is short? Is it 1 minute, 1 hour, 1 day, 1 century (which is VERY short compared to the age of the planet)? Without context the question is meaningless. – John Gardeniers Jan 24 '11 at 20:36
  • 2
    A short TTL is shorter than a long TTL. I know the word short is relative, but I don't think it is a problem here. – webnat0 Jan 24 '11 at 23:16
  • 1
    What is so difficult to understand? What is the advantage of setting TTL to 24 hours when you could set it to 5 minutes? Why not leave it at 5 minutes? – wobbily_col Jul 26 '16 at 9:40
25

Your DNS should not change very often in the first place. Many DNS server do not honor your TTL "request" and impose their own policy. If you're going to make a chage, set the TTL lower weeks before the change. Normally having a long TTL helps reduce load on your authoritative server(s) and adds a bit of time to clients accessing your site. I commonly use 3600, or even 36000 depending on the situation.

10
  • 8
    +1 for Many DNS server do not honor your TTL - there are so many issues raised on this site when particular upstream DNS cache's ignore your TTL – Mark Henderson Jan 24 '11 at 3:49
  • 2
    +1 for what Mark said but -1 for "Your DNS should not change very often in the first place". There are plenty of exceptions to make such a generalisation invalid. e.g. DNS to support the use of dynamic IPs, where a short TTL is almost essential. – John Gardeniers Jan 24 '11 at 4:37
  • +1 ... and I suspect one of the reasons extremely short TTL's aren't honored would be to discourage fast flux abuse: en.wikipedia.org/wiki/Fast_flux (i.e. there is a very good reason short TTL's are ignored) – danlefree Jan 24 '11 at 6:47
  • actually Chris, and you know I love you right :), we have VERY short TTLs on our entries simply to help with our DR policy. Now we have lots of our own DNS servers so can control this well and use Cisco GSS's to actually manage the DNS switchovers but we'd be in a hole without sub-minute TTLs. Still going to upvote you as you're right, just not for my own kinda-edge-case ;) – Chopper3 Jan 24 '11 at 12:23
  • 1
    @Chris, then perhaps it should be closed. – John Gardeniers Jan 24 '11 at 20:45
8

Higher TTLs mean fewer DNS lookups, which probably will translate in to lower "costs" for you and whoever's hitting your DNS. (less round trips)

That said, very low TTLs can be useful for infrastructure.

If you've got a 'floating' backend infrastructure DNS name (eg. puppet.sample.com) that you move from one box to another for High Availability and it's only your systems that need to honor that record, then low TTLs can be quite useful.

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