TTL (Time To Live)

image.png

What is DNS?

Domain Name System = Phone book of the internet Converts google.com to 142.250.194.46

TTL = How long to remember/cache a DNS answer

When DNS Resolver gets an answer, it caches (remembers) it for a certain time. TTL tells it "how long to remember this answer before asking again."

Simple Example:

DNS Record:

google.com → 142.250.194.46
TTL: 300 seconds (5 minutes)

What happens:

First time:

Within 5 minutes (TTL not expired):

After 5 minutes (TTL expired):