×
Community Blog Learning What DNS TTL Is and Setting It on Alibaba Cloud

Learning What DNS TTL Is and Setting It on Alibaba Cloud

This article explains what DNS TTL is and how to set it on Alibaba Cloud.

By Alain Francois

As a system administrator, it can happen when you have to operate with Domain Name System (DNS) configurations. It is a service whose main function is to translate a domain name (such as alibabacloud.com) into an IP address. This allows you to enter the domain name without entering a long IP address that you will have trouble remembering. The resolution request can go through multiple servers.

A DNS resolver has to cache a query before requesting a new one during a specific time, and the DNS Time to Live (TTL) helps set that. The DNS cache is the record storage, and the caching is the act of storing records. So, the TTL represents the time each step takes for DNS to cache a record.

How Does TTL Work?

When you are about to register a new domain name, you must choose a TTL value for its associated records. So, it is the sort of expiration date that is put on a DNS record.

During a DNS request, a user typically connects to a DNS resolver that will forward the user's query to the DNS authoritative server. Then, this one will send back the response to the query with an accompanying TTL value. That means the resolver can cache the retrieved answer for the TTL time set.

After that, if some other users ask the same query within the one-hour window, instead of querying the authoritative server again, the queries can be answered by referring directly to the DNS resolver's cache, making things much faster.

TTL Values

When you create a DNS record, you have to set a TTL. TTL times are always represented in seconds and can range anywhere from 30 seconds to a week. You can make it short or long depending on some situations:

  • For networks and securities reasons, short TTLs can help ensure quick turnover in the event of system failure and DDoS prevention with the most recent DNS updates.
  • For maintenance and public registration of domains, long TTLs can be useful.

The most common TTL settings are set around one hour (3600 seconds) or five minutes (300 seconds).

Setting TTL on Alibaba Cloud

You need to go to the menu that helps manage your domain to set TTL on your Alibaba Cloud console panel:

1

You will be prompted to the Alibaba Cloud DNS menu where you can add a domain if you don't have one yet:

2

As we have said, you manipulate the TTL values through DNS records. So, you need to edit a DNS record or create a new one if you don't have yet:

3

Now, you can set the TTL values when adding or editing DNS records. Alibaba Cloud will propose a list of values, and you will choose one on the list:

4

As you can see, it is defined in minutes, hours, and days by default as a reference for your understanding of the value you will define.

Conclusion

You can modify the TTL value for each of your DNS records, and the choice of a TTL value depends on external factors. Keep in mind that a longer TTL enables caching for longer periods, which is faster than retrieving answers from authoritative servers. However, you can need to use short TTL values for security reasons.

0 0 0
Share on

Alibaba Cloud Community

1,029 posts | 252 followers

You may also like

Comments