As we’ve explored in other articles, the Time To Live value (TTL for short) is a mechanism that controls how long a resolver or recursive DNS server should hold the information about a DNS query in its cache. This allows for reduced strain on the authoritative DNS server, and provides a quicker response to frequently requested names. One question that seems to come up a lot when we talk about the proper configuration of DNS resource records revolves around “getting away with” having a low TTL.
How Low Is Too Low?
While there is a sort of unspoken belief that setting a low TTL for a record will result in users getting sent to the most relevant endpoint as IPs change, the chain of recursive servers along the path vary in their interpretation and timing of caching. Some rudimentary round-robin setups leverage shorter TTLs to keep the mix of addresses diverse, which is an archaic methodology that has all but been replaced by things like Filter Chain.
The speed of light is only so fast - to that end, setting a TTL anywhere below 30 seconds will not give you any sort of advantage. Recursive DNS servers, whether open recursives or local resolvers, typically do not acknowledge a TTL of less than 30 seconds.
Making More Intelligent Load Balancing Decisions & Not Breaking Resolvers
For many years, the DNS industry as a whole has delivered a number of solutions that eliminate the need to leverage a round-robin load balancing methodology. These have varied in design and complexity, often doing some less than savory things with regard to the DNS RFC. To combat this, and inject intelligence along the path, NS1 includes Filter Chain™ with every level of Managed DNS service.
Filter Chains are akin to small applications that run at the edge of the NS1 Managed DNS network. These instances are configured by you, specific to the load balancing scheme you’re looking to achieve. For instance, it may make a lot of sense to set up a Filter Chain that removes any endpoints that are not responding based on a 3rd party monitoring solution’s data with the UP filter, which then randomly selects an endpoint using the SHUFFLE filter, and achieves RFC compliance with the SELECT_FIRST_N filter returning one IP address or FQDN as the DNS response.
While low TTL values sound like a solution to quick name resolution, the role of recursive servers and resolvers in the name resolution path make values lower than 30 seconds unsustainable. A better solution is to have some intelligent decision making in your Managed DNS server. If intelligent DNS is what you're interested in doing, give NS1 a call and see how our Filter Chain technology can build you a better Internet experience.