<s>
A	O
stateless	B-Protocol
protocol	I-Protocol
is	O
a	O
communication	O
protocol	O
in	O
which	O
the	O
receiver	O
must	O
not	O
retain	O
session	B-Protocol
state	O
from	O
previous	O
requests	O
.	O
</s>
<s>
The	O
sender	O
transfers	O
relevant	O
session	B-Protocol
state	O
to	O
the	O
receiver	O
in	O
such	O
a	O
way	O
that	O
every	O
request	O
can	O
be	O
understood	O
in	O
isolation	O
,	O
that	O
is	O
without	O
reference	O
to	O
session	B-Protocol
state	O
from	O
previous	O
requests	O
retained	O
by	O
the	O
receiver	O
.	O
</s>
<s>
In	O
contrast	O
,	O
a	O
stateful	B-Protocol
protocol	I-Protocol
is	O
a	O
communication	O
protocol	O
in	O
which	O
the	O
receiver	O
may	O
retain	O
session	B-Protocol
state	O
from	O
previous	O
requests	O
.	O
</s>
<s>
In	O
computer	B-Architecture
networks	I-Architecture
,	O
examples	O
of	O
stateless	B-Protocol
protocols	I-Protocol
include	O
the	O
Internet	B-Protocol
Protocol	I-Protocol
(	O
IP	B-Protocol
)	O
,	O
which	O
is	O
the	O
foundation	O
for	O
the	O
Internet	O
,	O
and	O
the	O
Hypertext	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
HTTP	B-Protocol
)	O
,	O
which	O
is	O
the	O
foundation	O
of	O
the	O
World	O
Wide	O
Web	O
.	O
</s>
<s>
Examples	O
of	O
stateful	B-Protocol
protocols	I-Protocol
include	O
the	O
Transmission	B-Protocol
Control	I-Protocol
Protocol	I-Protocol
(	O
TCP	B-Protocol
)	O
and	O
the	O
File	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
FTP	B-Protocol
)	O
.	O
</s>
<s>
Stateless	B-Protocol
protocols	I-Protocol
improve	O
the	O
properties	O
of	O
visibility	O
,	O
reliability	O
,	O
and	O
scalability	O
.	O
</s>
<s>
Scalability	O
is	O
improved	O
because	O
not	O
having	O
to	O
store	O
session	B-Protocol
state	O
between	O
requests	O
allows	O
the	O
server	B-Application
to	O
quickly	O
free	O
resources	O
and	O
further	O
simplifies	O
implementation	O
.	O
</s>
<s>
The	O
disadvantage	O
of	O
stateless	B-Protocol
protocols	I-Protocol
is	O
that	O
they	O
may	O
decrease	O
network	O
performance	O
by	O
increasing	O
the	O
repetitive	O
data	O
sent	O
in	O
a	O
series	O
of	O
requests	O
,	O
since	O
that	O
data	O
cannot	O
be	O
left	O
on	O
the	O
server	B-Application
and	O
reused	O
.	O
</s>
<s>
An	O
HTTP	B-Protocol
server	B-Application
can	O
understand	O
each	O
request	O
in	O
isolation	O
.	O
</s>
<s>
Contrast	O
this	O
with	O
a	O
traditional	O
FTP	B-Protocol
server	B-Application
that	O
conducts	O
an	O
interactive	O
session	B-Protocol
with	O
the	O
user	O
.	O
</s>
<s>
During	O
the	O
session	B-Protocol
,	O
a	O
user	O
is	O
provided	O
a	O
means	O
to	O
be	O
authenticated	O
and	O
set	O
various	O
variables	O
(	O
working	O
directory	O
,	O
transfer	O
mode	O
)	O
,	O
all	O
stored	O
on	O
the	O
server	B-Application
as	O
part	O
of	O
the	O
session	B-Protocol
state	O
.	O
</s>
<s>
There	O
can	O
be	O
complex	O
interactions	O
between	O
stateful	O
and	O
stateless	B-Protocol
protocols	I-Protocol
among	O
different	O
protocol	O
layers	O
.	O
</s>
<s>
For	O
example	O
,	O
HTTP	B-Protocol
,	O
a	O
stateless	B-Protocol
protocol	I-Protocol
,	O
is	O
layered	O
on	O
top	O
of	O
TCP	B-Protocol
,	O
a	O
stateful	B-Protocol
protocol	I-Protocol
,	O
which	O
is	O
layered	O
on	O
top	O
of	O
IP	B-Protocol
,	O
another	O
stateless	B-Protocol
protocol	I-Protocol
,	O
which	O
is	O
routed	O
on	O
a	O
network	O
that	O
employs	O
BGP	B-Protocol
,	O
another	O
stateful	B-Protocol
protocol	I-Protocol
,	O
to	O
direct	O
the	O
IP	B-Protocol
packets	O
riding	O
on	O
the	O
network	O
.	O
</s>
<s>
This	O
stacking	O
of	O
layers	O
continues	O
even	O
above	O
HTTP	B-Protocol
.	I-Protocol
</s>
<s>
As	O
a	O
workaround	O
for	O
the	O
lack	O
of	O
a	O
retained	O
session	B-Protocol
state	O
,	O
HTTP	B-Protocol
servers	O
implement	O
various	O
session	B-Protocol
management	I-Protocol
methods	O
,	O
typically	O
utilizing	O
a	O
session	B-Protocol
identifier	O
in	O
an	O
HTTP	B-Application
cookie	I-Application
referencing	O
a	O
session	B-Protocol
state	O
stored	O
on	O
the	O
server	B-Application
,	O
effectively	O
creating	O
a	O
stateful	B-Protocol
protocol	I-Protocol
on	O
top	O
of	O
HTTP	B-Protocol
.	I-Protocol
</s>
<s>
HTTP	B-Application
cookies	I-Application
violate	O
the	O
REST	B-Protocol
architectural	O
style	O
because	O
even	O
without	O
referencing	O
a	O
session	B-Protocol
state	O
stored	O
on	O
the	O
server	B-Application
,	O
they	O
are	O
independent	O
of	O
session	B-Protocol
state	O
(	O
they	O
affect	O
previous	O
pages	O
of	O
the	O
same	O
website	O
in	O
the	O
browser	O
history	O
)	O
and	O
they	O
have	O
no	O
defined	O
semantics	O
.	O
</s>
