Linode name server question
If I set the master TTL for a domain name to "default" in the Linode DNS server database the TTL value in the database for that DN is 0. When I look up the SOA record on the Internet the TTL is 1 day (86400 seconds). Am I correct in assuming that a value of 0 in the db for any TTL, either for an entire DN or for a single RR, causes the TTL lookup to fall through to the default in the enclosing entity?
4 Replies
@fmouse:
It's obvious what the answer to this question should be, but I want to make sure.
If I set the master TTL for a domain name to "default" in the Linode DNS server database the TTL value in the database for that DN is 0. When I look up the SOA record on the Internet the TTL is 1 day (86400 seconds). Am I correct in assuming that a value of 0 in the db for any TTL, either for an entire DN or for a single RR, causes the TTL lookup to fall through to the default in the enclosing entity?
For Linode, yes. In general, no. Linode uses the default TTL for several things, including the negative caching TTL (the last field in the SOA response; how long resolvers can cache NXDOMAIN responses), the SOA TTL itself, and the TTL of any records you add not explicitly overridden, which show as 0 in the API. If you encounter 0 in the TTL of a record looked up against an authoritative nameserver, that means "Do Not Cache," meaning the resolver should not cache the record at all and look it up every time (this is not a great idea; if you really need a really low TTL, don't go lower than 60). If you encounter 0 in the TTL of a record looked up against a resolver (shouldn't happen, but might), it means the cache has basically expired.
@dwfreed:
@fmouse:If you encounter 0 in the TTL of a record looked up against an authoritative nameserver, that means "Do Not Cache," meaning the resolver should not cache the record at all and look it up every time (this is not a great idea; if you really need a really low TTL, don't go lower than 60). If you encounter 0 in the TTL of a record looked up against a resolver (shouldn't happen, but might), it means the cache has basically expired.
I'm familiar with how this works in general, strictly speaking a 0 value for negative caching TTL means "don't cache", but my question is with regard to the Linode API and the database supporting Linode's DNS. Setting a TTL to 0 in the API, either using API calls or setting it to "default" in the web UI (which does the same thing) results in a published TTL of 1 day. I'm doing some programming using Linode API calls with the assumption that setting the TTL value to 0 in the Linode API won't cause the name server to publish this "don't cache" value.
@fmouse:
Setting a TTL to 0 in the API, either using API calls or setting it to "default" in the web UI (which does the same thing) results in a published TTL of 1 day.
That's the default default TTL. 0 will result in the published TTL being whatever the default TTL is set to in the zone settings (TTL_sec field in domain.create/domain.update in the API).
@fmouse:
I'm doing some programming using Linode API calls with the assumption that setting the TTL value to 0 in the Linode API won't cause the name server to publish this "don't cache" value.
That is a safe assumption.
@dwfreed:
That's the default default TTL. 0 will result in the published TTL being whatever the default TTL is set to in the zone settings (TTL_sec field in domain.create/domain.update in the API).
It actually goes to a higher level than this. Setting the zone TTL to 0 makes the default for all resource records 1 day unless they have a finite positive override set.