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.
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.
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:
The most common TTL settings are set around one hour (3600 seconds) or five minutes (300 seconds).
You need to go to the menu that helps manage your domain to set TTL on your Alibaba Cloud console panel:
You will be prompted to the Alibaba Cloud DNS menu where you can add a domain if you don't have one yet:
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:
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:
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.
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.
Breaking the Serverless Implementation Boundary: Alibaba Cloud SAE Releases Five New Features
1,044 posts | 257 followers
FollowAlibaba Cloud Community - October 17, 2022
Alibaba Clouder - April 14, 2021
JJ Lim - April 19, 2022
Alibaba Clouder - August 31, 2018
Alibaba Clouder - February 10, 2020
JJ Lim - November 10, 2021
1,044 posts | 257 followers
FollowHTTPDNS is a domain name resolution service for mobile clients. It features anti-hijacking, high accuracy, and low latency.
Learn MoreEMAS HTTPDNS is a domain name resolution service for mobile clients. It features anti-hijacking, high accuracy, and low latency.
Learn MoreAlibaba Cloud WHOIS allows you to view domain information.
Learn MoreLimited Offer! Only $4.90/1st Year for New Users.
Learn MoreMore Posts by Alibaba Cloud Community