What Is TTL?

What Is TTL

Date First Published: 18th September 2023

Topic: Computer Networking

Subtopic: Network Identifiers

Article Type: Computer Terms & Definitions

Difficulty: Advanced

Difficulty Level: 9/10

CONTENTS

Learn about what TTL is in this article.

Stands for Time To Live. TTL is a value that specifies how long a packet of data or information should remain on a computer or network before being discarded. TTL can refer to several concepts in computer networking and the meaning depends on the context, which is explained below.

Traceroute

In traceroute, TTL indicates how many more routers or hops it is allowed to pass before expiring. The TTL value is decreased by 1 for every router a packet passes through. If the TTL reaches 0, the data packet has expired and gets discarded. The use of small TTL values that quickly expire forces routers to send these ICMP messages, which also identify the router. Without a TTL value, there is a risk that a packet of information will continue to pass from router to router indefinitely.

DNS

In DNS, TTL defines the number of seconds that a cache server can provide its cached value for the DNS record. After the TTL has expired, the DNS record is refreshed. These TTL entries can be set as low as 30 seconds if the record is frequently updated, but lower-priority records can be set as long as 86,400 seconds (24 hours).

Cache

On both the server side and client side, TTL specifies the number of seconds, minutes, hours, or days content will be cached. Web browsers store cached images, HTML, CSS, and JavaScript files until their time to live (TTL) expires. After the TTL expires, a request will be made to the server and it will be loaded as if it was the first time the user visited the page.

CDNs store the cached data until the TTL expires. The TTL specifies the number of seconds, minutes, hours, or days content will be cached and is stored in the HTTP header. Some CDNs may automatically delete files from the cache early if the content is not requested for a while or if the CDN cache is manually cleared. Each time websites respond to a CDN server with the requested content, they also attach the TTL of the content.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.


Comments