Understanding TTL (Time To Live) in DNS – Route 53

What is TTL?

TTL (Time To Live) is a crucial setting in DNS records that determines how long a DNS response is cached by clients or recursive resolvers. When a client queries a DNS record (e.g., myapp.example.com), it receives an IP address along with a TTL value, which dictates how long the client should cache this response before making another DNS request.

TTL in Action

Impact of High vs. Low TTL

TTL Value Advantages Disadvantages
High TTL (e.g., 24 hours) Less DNS traffic → Cost savings Updates take longer to propagate
Low TTL (e.g., 60 seconds) Faster updates, more flexibility Higher DNS traffic → Increased costs

TTL Change Strategy

If you plan to modify a DNS record:

  1. Lower the TTL (e.g., from 24 hours to 60 seconds).
  2. Wait for the old TTL period to expire so all clients receive the new, lower TTL.
  3. Update the DNS record (e.g., change the IP address).
  4. Increase the TTL again to optimize performance and reduce costs.

TTL in Practice (AWS Route 53 Console)

  1. Creating a New Record
  2. Verifying the DNS Resolution
  3. Updating the DNS Record