In Amazon Route 53, the TTL (Time to Live) setting specifies the duration (in seconds) that a DNS resolver or caching system should cache the DNS record before querying Route 53 for updated information. It defines how long the record remains valid and determines how often clients (e.g., web browsers, DNS resolvers) refresh their cached version of the record.
Key Details of TTL :
-
Purpose:
- To improve DNS performance by reducing the number of queries sent to Route 53.
- To control how quickly changes to DNS records propagate globally.
-
Value Range:
- TTL values are specified in seconds and typically range from 30 seconds to several hours or even days.
- Common TTL values:
- Low TTL: 30–300 seconds (useful for dynamic or frequently changing records).
- High TTL: 3600–86400 seconds (useful for static or rarely changing records).
-
Default Behavior in Route 53:
- Route 53 allows you to set the TTL for most DNS record types (e.g., A, AAAA, CNAME, TXT).
- For Alias Records, TTL is managed automatically by Route 53, and you cannot manually set it. The default is set to 60 seconds.
How TTL Works :
- A client (e.g., a web browser) makes a DNS query for a domain, such as
example.com.
- A DNS resolver caches the DNS record for the duration of the TTL.
- During the TTL period:
- The resolver will use the cached record without querying Route 53 again.
- Once the TTL expires:
- The resolver will query Route 53 for the latest record.