6

What is a TTL in DNS? What is the advantage of having small TTL?

1 Answer 1

8

"TTLs also occur in the Domain Name System (DNS), where they are set by an authoritative nameserver for a particular resource record. When a caching (recursive) nameserver queries the authoritative nameserver for a resource record, it will cache that record for the time (in seconds) specified by the TTL. If a stub resolver queries the caching nameserver for the same record before the TTL has expired, the caching server will simply reply with the already cached resource record rather than retrieve it from the authoritative nameserver again. Nameservers may also have a TTL set for NXDOMAIN (acknowledgment that a domain does not exist); but they are generally short in duration (3 hours at most).

Shorter TTLs can cause heavier loads on an authoritative nameserver, but can be useful when changing the address of critical services like web servers or MX records, and therefore are often lowered by the DNS administrator prior to a service being moved, in order to minimize disruptions.

The units used are seconds. A common TTL value for DNS is 86400 seconds, which is 24 hours. A TTL value of 86400 would mean that if a DNS record was changed, DNS servers around the world could still be showing the old value from their cache for up to 24 hours after the change."

http://en.wikipedia.org/wiki/Time_to_live#DNS_records

3
  • 2
    I might add: RIPE Recommendations for DNS SOA Values: ripe.net/docs/ripe-203.html
    – asdmin
    Mar 11, 2010 at 14:39
  • 2
    "DNS servers around the world could still be showing the old value from their cache for up to 24 hours after the change." Assuming they obey TTLs, that is. Some have a minimum cache length. If I set my TTL to 30 seconds, it's likely going to still take a day at some ISPs.
    – ceejayoz
    Mar 11, 2010 at 14:45
  • Thank you maclema, asdmin and ceejayoz. It there a benefit of having small TTL for dynamic DNS servers. When small TTL cause heavier load why are there providers who offer setting of small TTL values(there are who allow 5 secs TTL). can you explain please.
    – user31394
    Mar 13, 2010 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .