Re:Staying Out of TTL Hell
by toast0 on Wednesday March 10, 2021 @02:11PM
(#26414874)
That could probably go into a whole separate article. But...
The first rule of DNS TTLs is expect some things to not respect them.
If you are changing your records frequently or urgently, set ttl somewhere between 1 minute and 5 minutes. Maybe 15 seconds if it's really a lot, but don't go below that cause things get weird.
Other than that, most things should probably be between an hour to four hours.
If you're paying per query, make ttls longer to reduce your costs. Don't make ttls longer than one or two days.
Also, don't make long chains of cnames and what not, and don't let your responses grow beyond 512 bytes (cause it won't work on some networks), allowing for NAT64 turning your A records into AAAA records. IIRC that means don't return more than 8 A records, but your mileage may vary.
The first rule of DNS TTLs is expect some things to not respect them.
If you are changing your records frequently or urgently, set ttl somewhere between 1 minute and 5 minutes. Maybe 15 seconds if it's really a lot, but don't go below that cause things get weird.
Other than that, most things should probably be between an hour to four hours.
If you're paying per query, make ttls longer to reduce your costs. Don't make ttls longer than one or two days.
Also, don't make long chains of cnames and what not, and don't let your responses grow beyond 512 bytes (cause it won't work on some networks), allowing for NAT64 turning your A records into AAAA records. IIRC that means don't return more than 8 A records, but your mileage may vary.