Caching and time to live
Because of the huge volume of requests generated by a system like the DNS, the designers wished to provide a mechanism to reduce the load on individual DNS servers. The mechanism devised provided that when a DNS resolver (i.e. client) received a DNS response, it would cache that response for a given period of time. A value (set by the administrator of the DNS server handing out the response) called the time to live, or TTL defines that period of time. Once a response goes into cache, the resolver will consult its cached (stored) answer; only when the TTL expires (or when an administrator manually flushes the response from the resolver's memory) will the resolver contact the DNS server for the same information.
Generally, the time to live is specified in the Start of Authority (SOA) record. SOA parameters are:
Serial — the zone serial number, incremented when the zone file is modified, so the slave and secondary name servers know when the zone has been changed and should be reloaded.
Refresh — This is the number of seconds between update requests from secondary and slave name servers.
Retry — This is the number of seconds the secondary or slave will wait before retrying when the last attempt has failed.
Expire — This is the number of seconds a master or slave will wait before considering the data stale if it cannot reach the primary name server.
Minimum — Previously used to determine the minimum TTL, this is used for negative caching. This is the default TTL if the domain does not specify a TTL.
TTL (time to live) - The number of seconds a domain name is cached locally before expiration and return to authoritative nameservers for updated information.
- 69 Users Found This Useful