TTL

Stands for "Time to Live."

TTL can refer to one of several concepts in computer networking. It can refer to the part of the TCP/IP protocol that sets an expiration timer for every data packet sent over a network. It can also refer to how long a server stores cached information before refreshing it.

TCP/IP

When a data packet is sent from one computer to another over the Internet, it travels by moving from one network to another until it reaches its destination. Each step along the journey is referred to as a "hop." Each data packet traveling along a network adds a small amount of overhead, so packets unable to reach their destination hopping around indefinitely would slow down network performance significantly. To prevent this, every data packet is given a TTL count when sent to prevent it from hopping around forever.

A data packet's TTL count is an 8-bit number (between 1 and 255, typically set in the middle between 32 and 128) that specifies the maximum number of hops it can take before expiring and being discarded. Every time that a data packet hops from one router to the next, the TTL count is decreased by 1. If the TTL count reaches 0 before it reaches its destination, it's discarded by the router.

Cache

TTL can also refer to the amount of time that a server keeps a cache of data for retrieval before refreshing it. For example, a DNS server will have a TTL value for each record, measured in seconds, that controls how long it can serve a record before refreshing it. These TTL entries can be set as low as 30 seconds, but lower-priority records can be set as long as 86,400 seconds (24 hours).

A CDN server will have a TTL value for every asset it stores that controls how long it keeps a cached copy before it checks the origin server for changes. This allows the CDN to check frequently-updated files often, while other assets can be cached for days or weeks between updates.

Updated September 27, 2022 by Brian P.

quizTest Your Knowledge

Which of these protocols does not establish a connection using a handshake?

A
TCP
0%
B
SMTP
0%
C
UDP
0%
D
TLS
0%
Correct! Incorrect!     View the Handshake definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of TTL on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.