<s>
Time	B-Protocol
to	I-Protocol
live	I-Protocol
(	O
TTL	O
)	O
or	O
hop	B-Protocol
limit	I-Protocol
is	O
a	O
mechanism	O
which	O
limits	O
the	O
lifespan	O
or	O
lifetime	O
of	O
data	O
in	O
a	O
computer	O
or	O
network	O
.	O
</s>
<s>
In	O
computer	B-Architecture
networking	I-Architecture
,	O
TTL	O
prevents	O
a	O
data	O
packet	O
from	O
circulating	O
indefinitely	O
.	O
</s>
<s>
In	O
computing	O
applications	O
,	O
TTL	O
is	O
commonly	O
used	O
to	O
improve	O
the	O
performance	O
and	O
manage	O
the	O
caching	B-General_Concept
of	O
data	O
.	O
</s>
<s>
The	O
original	O
DARPA	O
Internet	B-Protocol
Protocol	I-Protocol
's	O
RFC	O
document	O
describes	O
TTL	O
as	O
:	O
</s>
<s>
Under	O
the	O
Internet	B-Protocol
Protocol	I-Protocol
,	O
TTL	O
is	O
an	O
8-bit	O
field	O
.	O
</s>
<s>
In	O
the	O
IPv4	B-Protocol
header	O
,	O
TTL	O
is	O
the	O
9th	O
octet	O
of	O
20	O
.	O
</s>
<s>
In	O
the	O
IPv6	B-Protocol
header	O
,	O
it	O
is	O
the	O
8th	O
octet	O
of	O
40	O
.	O
</s>
<s>
The	O
time-to-live	B-Protocol
value	O
can	O
be	O
thought	O
of	O
as	O
an	O
upper	O
bound	O
on	O
the	O
time	O
that	O
an	O
IP	O
datagram	B-Protocol
can	O
exist	O
in	O
an	O
Internet	O
system	O
.	O
</s>
<s>
The	O
TTL	O
field	O
is	O
set	O
by	O
the	O
sender	O
of	O
the	O
datagram	B-Protocol
,	O
and	O
reduced	O
by	O
every	O
router	B-Protocol
on	O
the	O
route	O
to	O
its	O
destination	O
.	O
</s>
<s>
If	O
the	O
TTL	O
field	O
reaches	O
zero	O
before	O
the	O
datagram	B-Protocol
arrives	O
at	O
its	O
destination	O
,	O
then	O
the	O
datagram	B-Protocol
is	O
discarded	O
and	O
an	O
Internet	B-Protocol
Control	I-Protocol
Message	I-Protocol
Protocol	I-Protocol
(	O
ICMP	O
)	O
error	O
datagram	B-Protocol
(	O
11	O
-	O
Time	O
Exceeded	O
)	O
is	O
sent	O
back	O
to	O
the	O
sender	O
.	O
</s>
<s>
The	O
purpose	O
of	O
the	O
TTL	O
field	O
is	O
to	O
avoid	O
a	O
situation	O
in	O
which	O
an	O
undeliverable	O
datagram	B-Protocol
keeps	O
circulating	O
on	O
an	O
Internet	O
system	O
,	O
and	O
such	O
a	O
system	O
eventually	O
becoming	O
swamped	O
by	O
such	O
"	O
immortals	O
"	O
.	O
</s>
<s>
In	O
theory	O
,	O
under	O
IPv4	B-Protocol
,	O
time	B-Protocol
to	I-Protocol
live	I-Protocol
is	O
measured	O
in	O
seconds	O
,	O
although	O
every	O
host	O
that	O
passes	O
the	O
datagram	B-Protocol
must	O
reduce	O
the	O
TTL	O
by	O
at	O
least	O
one	O
unit	O
.	O
</s>
<s>
In	O
practice	O
,	O
the	O
TTL	O
field	O
is	O
reduced	O
by	O
one	O
on	O
every	O
hop	B-Protocol
.	O
</s>
<s>
To	O
reflect	O
this	O
practice	O
,	O
the	O
field	O
is	O
renamed	O
hop	B-Protocol
limit	I-Protocol
in	O
IPv6	B-Protocol
.	O
</s>
<s>
TTLs	O
also	O
occur	O
in	O
the	O
Domain	B-Protocol
Name	I-Protocol
System	I-Protocol
(	O
DNS	B-Protocol
)	O
,	O
where	O
they	O
are	O
set	O
by	O
an	O
authoritative	O
name	B-Protocol
server	I-Protocol
for	O
a	O
particular	O
resource	O
record	O
.	O
</s>
<s>
When	O
a	O
caching	B-General_Concept
(	O
recursive	O
)	O
nameserver	B-Protocol
queries	O
the	O
authoritative	O
nameserver	B-Protocol
for	O
a	O
resource	O
record	O
,	O
it	O
will	O
cache	B-General_Concept
that	O
record	O
for	O
the	O
time	O
(	O
in	O
seconds	O
)	O
specified	O
by	O
the	O
TTL	O
.	O
</s>
<s>
If	O
a	O
stub	O
resolver	O
queries	O
the	O
caching	B-General_Concept
nameserver	B-Protocol
for	O
the	O
same	O
record	O
before	O
the	O
TTL	O
has	O
expired	O
,	O
the	O
caching	B-General_Concept
server	O
will	O
simply	O
reply	O
with	O
the	O
already	O
cached	O
resource	O
record	O
rather	O
than	O
retrieve	O
it	O
from	O
the	O
authoritative	O
nameserver	B-Protocol
again	O
.	O
</s>
<s>
TTL	O
for	O
NXDOMAIN	O
(	O
non-existent	O
domain	O
)	O
responses	O
is	O
set	O
from	O
the	O
minimum	O
of	O
the	O
MINIMUM	O
field	O
of	O
the	O
SOA	O
record	O
and	O
the	O
TTL	O
of	O
the	O
SOA	O
itself	O
,	O
and	O
indicates	O
how	O
long	O
a	O
resolver	O
may	O
cache	B-General_Concept
the	O
negative	O
answer	O
.	O
</s>
<s>
Shorter	O
TTLs	O
can	O
cause	O
heavier	O
loads	O
on	O
an	O
authoritative	O
name	B-Protocol
server	I-Protocol
,	O
but	O
can	O
be	O
useful	O
when	O
changing	O
the	O
address	O
of	O
critical	O
services	O
like	O
web	B-Application
servers	I-Application
or	O
MX	B-Protocol
records	I-Protocol
,	O
and	O
therefore	O
are	O
often	O
lowered	O
by	O
the	O
DNS	B-Protocol
administrator	O
prior	O
to	O
a	O
service	O
being	O
moved	O
,	O
in	O
order	O
to	O
reduce	O
possible	O
disruptions	O
.	O
</s>
<s>
An	O
older	O
common	O
TTL	O
value	O
for	O
DNS	B-Protocol
was	O
86400	O
seconds	O
,	O
which	O
is	O
24	O
hours	O
.	O
</s>
<s>
A	O
TTL	O
value	O
of	O
86400	O
would	O
mean	O
that	O
,	O
if	O
a	O
DNS	B-Protocol
record	O
was	O
changed	O
on	O
the	O
authoritative	O
nameserver	B-Protocol
,	O
DNS	B-Protocol
servers	I-Protocol
around	O
the	O
world	O
could	O
still	O
be	O
showing	O
the	O
old	O
value	O
from	O
their	O
cache	B-General_Concept
for	O
up	O
to	O
24	O
hours	O
after	O
the	O
last	O
update	O
by	O
client	O
.	O
</s>
<s>
Newer	O
DNS	B-Protocol
methods	O
that	O
are	O
part	O
of	O
a	O
disaster	B-General_Concept
recovery	I-General_Concept
(	O
DR	O
)	O
system	O
may	O
have	O
some	O
records	O
deliberately	O
set	O
extremely	O
low	O
on	O
TTL	O
.	O
</s>
<s>
TTL	O
values	O
are	O
"	O
per	O
record	O
"	O
and	O
setting	O
this	O
value	O
on	O
specific	O
records	O
is	O
sometimes	O
honored	O
automatically	O
by	O
all	O
standard	O
DNS	B-Protocol
systems	I-Protocol
worldwide	O
.	O
</s>
<s>
However	O
,	O
a	O
problem	O
persists	O
in	O
that	O
some	O
caching	B-General_Concept
DNS	B-Protocol
nameservers	B-Protocol
set	O
their	O
own	O
TTLs	O
regardless	O
of	O
the	O
authoritative	O
records	O
,	O
thus	O
it	O
cannot	O
be	O
guaranteed	O
that	O
all	O
downstream	O
DNS	B-Protocol
servers	I-Protocol
have	O
the	O
new	O
records	O
after	O
the	O
TTL	O
has	O
expired	O
.	O
</s>
<s>
Time	B-Protocol
to	I-Protocol
live	I-Protocol
may	O
also	O
be	O
expressed	O
as	O
the	O
date	O
and	O
time	O
on	O
which	O
a	O
record	O
expires	O
.	O
</s>
<s>
The	O
Expires	O
:	O
header	O
in	O
HTTP	O
responses	O
,	O
the	O
Cache-Control	O
:	O
max-age	O
header	O
field	O
in	O
both	O
requests	O
and	O
responses	O
and	O
the	O
expires	O
field	O
in	O
HTTP	O
cookies	O
express	O
time-to-live	B-Protocol
in	O
this	O
way	O
.	O
</s>
