O'Reilly's Performance Optimizations in a Cloud-Centric World

Learn all you need to know about email best practices, deliverability, and tools with email whitepapers and ebooks.

Issue link: https://hub.dyn.com/i/545501

Contents of this Issue


Page 27 of 38

Therefore, it's good practice to use a managed DNS solution that is provider-independent and to ensure that it offers the services described in the following sections. A Low-Latency Network It is essential that the DNS provider you select operates a low- latency network, allowing fast resolution of DNS records wherever your users are situated. As all users will need to resolve your DNS record before accessing your system, a slow resolution time will add delay onto the first request to your site for all users. If you're using domain sharding (i.e., serving your content from many subdomains to improve per‐ formance), then this delay is applicable for each of subdomains you are using. (The actual impact of the overall delay will be dependent on how well constructed your page is; a well-constructed page will ensure that as many requests as possible are made concurrently.) Support for DNS-Based Failover If your provider has a complete outage, then your DNS provider should allow a switch to point traffic to another location. Alterna‐ tively, if one of the cloud providers you're sitting behind has an out‐ age, then you need to be able to quickly reroute traffic to bypass that service. TTL and DNS TTL, or time to live, is the element of a DNS record that tells the requester how long the record is valid for. In other words, if the TTL for your DNS record is set to 24 hours, once a browser has resolved that DNS record, it will continue to use that same value for the next 24 hours regardless of whether you've updated the details. If the TTL is set too high, then DNS cannot be used as a failover method, as the change will take too long to take effect with any existing users. Setting a very low TTL, however, adds extra over‐ head, as DNS lookups have to happen much more regularly, which adds to the page-load time for a user and increases the stress on the DNS servers. 18 | Chapter 3: Minimizing Performance Risks

Articles in this issue

view archives of eBooks - O'Reilly's Performance Optimizations in a Cloud-Centric World