What is TTL (Time to Live)?
Turkish: TTL
TTL defines how long DNS records or cache entries are considered valid before they must be requested or generated again.
What is TTL?
TTL (Time to Live) defines how long a piece of information can stay in cache. Its most common use is in DNS records, where a resolver can reuse a domain record until the TTL expires.
How Does It Work in DNS and Cache?
If an A record has a TTL of 3600, a resolver may keep that IP address for about one hour. During that time, even if the authoritative DNS server changes the record, some users may still see the old value.
In cache systems, TTL defines when an API response, HTML page, image, or session value is no longer considered fresh. After expiration, the data is fetched or generated again.
How Is It Chosen?
A low TTL helps changes propagate faster, but it can increase requests to DNS or origin servers. A high TTL improves performance and cache efficiency, but old information may remain longer during an IP change or migration.
For this reason, teams often lower TTL before a DNS migration and use longer values during stable periods to improve cache efficiency.
Related Terms
A cache stores frequently used data temporarily so applications can respond quickly without repeating expensive origin requests.
DNS (Domain Name System)DNS maps readable domain names to IP addresses so browsers, email servers, and APIs can reach the right destination without hard-coded numbers.