Tag Archives: TTL values

How to choose DNS TTL values?

The Domain Name System (DNS) involves different vital processes for your domain. DNS TTL or time-to-live values are your chance to set up time in your favor! This means the power of making those processes more agile!

What is TTL?

Time-to-live (TTL) is the value that establishes the time period or the number of hops that a data packet is set up for being alive. Either on a network or in the cache memory. When this time expires or the data packet reaches its limit of hops, it will be stopped. Data packets are not all the same, they are different between them, but they all have their own TTL. That time should be determined based on the period data packets need to live in a device for achieving their missions completely. 

Do we really need TTL?

Absolutely yes! We totally need TTL to control the traffic and amount of data packets traveling around networks, applications, and machines. Imagine a scenario without the existence of TTL or any other mechanism to control data packets. By now, traffic on the Internet would already be in total chaos. Millions of already pointless data packets that accomplished their mission decades ago could still be traveling without purpose and end.

Through DNS TTL, routers can manage the traffic by simply reading the value every data packet has. Packets will continue their journey only if their TTL is not expired. When a router stops a data packet, it reports this to the IP address of the data source through an ICMP message. ICMP or Internet Control Message Protocol is a tool for diagnosing and informing issues.

And there’s more: TTL is useful also for knowing how long a packet has been on a network and for tracking its whole route!

How to choose DNS TTL values?

There we go! You can slow or speed essential DNS processes on your domain, smartly choosing DNS TTL values. 

  • DNS records are different between them, just like their purposes. When you add or edit a DNS record, be aware of the number of changes it will need in the future. DNS records that constantly require changes should have a lower TTL value. And the ones that almost don’t change in time should have a higher TTL value.
  • DNS resolution is an essential DNS process for every domain. If you want to speed it up, define higher values on the DNS records. This way, they will be stored for a longer time on the DNS recursive servers’ cache.
  • To cache static resources of your domain is a very recommended practice. Use high TTL values, and you will totally speed the loading time.
  • DNS propagation is another vital process. If your domain frequently requires modifications on its DNS records, you have to choose lower TTL values to speed up the propagation. Otherwise, high values will have the opposite effect.
  • The definition of DNS TTL values must be taken seriously. Especially when there’s a lot at stake, just think about domains of mission-critical services. An electric power grid operating system, aircraft or railway, demands constant updating and DNS load balancing configurations. Not being able to execute such tasks quickly could mean severe risks for many people involved. Those kinds of services mostly use low TTL values.

Conclusion.

Time is not always the enemy. Knowing how to choose DNS TTL values smartly, time can become a great ally!