Issue link: https://read.uberflip.com/i/1146286
DNS Caching and TTLs | 65 domain names in a short period of time, earlier DNS records are discarded and the domain must be looked up again. Remember, however, that if the browser discards a DNS record, the operating sys- tem cache might still have it, and that saves the day because no query has to be sent over the network, thereby avoiding what could be noticeable delays. TTL Values The maximum TTL values sent to clients for 10 top U.S. web sites range from one minute to one hour, as shown in Table 9-1. Why do these values vary so much? It's probably a mixture of intentional and histori- cal factors. An interesting RFC * provides more details about the format of DNS records and common mistakes made when configuring them. Its first suggestion is to avoid making the TTL values too short, with a recommended value of one day! These top web sites, given their large numbers of users, strive to have DNS resolvers quickly failover when a server, virtual IP address (VIP), or co-location goes offline. That's the reason for Yahoo!'s short TTL. MySpace, on the other hand, is located in one co-location facility. Failover is less critical given their current network topology, so a longer TTL is chosen because it reduces the number of DNS lookups, which in turn reduces the load on their name servers. Making DNS configuration recommendations is beyond the scope of this book. What is most relevant, however, is how DNS caching affects the performance of web pages. Let's view DNS caching from the browser's perspective to determine how many DNS lookups your web pages cause. Table 9-1. TTL values Domain TTL http://www.amazon.com 1 minute http://www.aol.com 1 minute http://www.cnn.com 10 minutes http://www.ebay.com 1 hour http://www.google.com 5 minutes http://www.msn.com 5 minutes http://www.myspace.com 1 hour http://www.wikipedia.org 1 hour http://www.yahoo.com 1 minute http://www.youtube.com 5 minutes * "Common DNS Data File Configuration Errors," http://tools.ietf.org/html/rfc1537.

