Kamran Mushtaq
Back to Systems Design
Systems Design

TTL (Time to Live) - DNS

Added: June 24, 2026

Definition

DNS TTL (Time to Live) is the amount of time a DNS record can be stored (cached) before it must be requested again from a DNS server.

What Problem It Solves

  • Reduces repeated DNS lookups.
  • Speeds up website access.
  • Lowers load on DNS servers.
  • Ensures DNS changes eventually reach users.

What Happens If Not Used

  • DNS servers would receive far more queries.
  • Website lookups would be slower.
  • Old DNS information might never be refreshed.

Easy Wording

DNS TTL is an expiry timer attached to a DNS record. Until the timer expires, devices can reuse the saved answer instead of asking the DNS server again.

Layman Example

You ask a friend for a restaurant's address. They say, "You can use this address for the next 24 hours." During those 24 hours, you don't ask again. After that, you check for an updated address. The 24 hours is the TTL.

Technical Example

example.com → 203.0.113.5 TTL = 3600 seconds

  • A DNS resolver receives this record.
  • It caches the answer for 1 hour.
  • Any requests during that hour use the cached record.
  • After 3600 seconds, the cache expires and a new DNS lookup is performed.