<s>
A	O
web	B-Application
server	I-Application
is	O
computer	B-Application
software	I-Application
and	O
underlying	O
hardware	B-Architecture
that	O
accepts	O
requests	O
via	O
HTTP	B-Protocol
(	O
the	O
network	O
protocol	O
created	O
to	O
distribute	O
web	O
content	O
)	O
or	O
its	O
secure	O
variant	O
HTTPS	B-Protocol
.	O
</s>
<s>
A	O
user	B-Protocol
agent	I-Protocol
,	O
commonly	O
a	O
web	B-Application
browser	I-Application
or	O
web	B-Application
crawler	I-Application
,	O
initiates	O
communication	O
by	O
making	O
a	O
request	O
for	O
a	O
web	O
page	O
or	O
other	O
resource	O
using	O
HTTP	B-Protocol
,	O
and	O
the	O
server	B-Application
responds	O
with	O
the	O
content	O
of	O
that	O
resource	O
or	O
an	O
error	B-Protocol
message	I-Protocol
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
can	O
also	O
accept	O
and	O
store	O
resources	O
sent	O
from	O
the	O
user	B-Protocol
agent	I-Protocol
if	O
configured	O
to	O
do	O
so	O
.	O
</s>
<s>
The	O
hardware	B-Architecture
used	O
to	O
run	O
a	O
web	B-Application
server	I-Application
can	O
vary	O
according	O
to	O
the	O
volume	O
of	O
requests	O
that	O
it	O
needs	O
to	O
handle	O
.	O
</s>
<s>
At	O
the	O
low	O
end	O
of	O
the	O
range	O
are	O
embedded	B-Architecture
systems	I-Architecture
,	O
such	O
as	O
a	O
router	B-Protocol
that	O
runs	O
a	O
small	O
web	B-Application
server	I-Application
as	O
its	O
configuration	O
interface	O
.	O
</s>
<s>
A	O
high-traffic	O
Internet	O
website	O
might	O
handle	O
requests	O
with	O
hundreds	O
of	O
servers	O
that	O
run	O
on	O
racks	B-Application
of	O
high-speed	O
computers	O
.	O
</s>
<s>
A	O
resource	O
sent	O
from	O
a	O
web	B-Application
server	I-Application
can	O
be	O
a	O
pre-existing	O
file	B-Operating_System
(	O
static	O
content	O
)	O
available	O
to	O
the	O
web	B-Application
server	I-Application
,	O
or	O
it	O
can	O
be	O
generated	O
at	O
the	O
time	O
of	O
the	O
request	O
(	O
dynamic	O
content	O
)	O
by	O
another	O
program	B-Application
that	O
communicates	O
with	O
the	O
server	B-Application
software	I-Application
.	O
</s>
<s>
The	O
former	O
usually	O
can	O
be	O
served	O
faster	O
and	O
can	O
be	O
more	O
easily	O
cached	B-Protocol
for	O
repeated	O
requests	O
,	O
while	O
the	O
latter	O
supports	O
a	O
broader	O
range	O
of	O
applications	O
.	O
</s>
<s>
Technologies	O
such	O
as	O
REST	B-Protocol
and	O
SOAP	B-Application
,	O
which	O
use	O
HTTP	B-Protocol
as	O
a	O
basis	O
for	O
general	O
computer-to-computer	O
communication	O
,	O
as	O
well	O
as	O
support	O
for	O
WebDAV	B-Protocol
extensions	O
,	O
have	O
extended	O
the	O
application	O
of	O
web	B-Application
servers	I-Application
well	O
beyond	O
their	O
original	O
purpose	O
of	O
serving	O
human-readable	O
pages	O
.	O
</s>
<s>
This	O
is	O
a	O
very	O
brief	O
history	O
of	O
web	B-Application
server	I-Application
programs	O
,	O
so	O
some	O
information	O
necessarily	O
overlaps	O
with	O
the	O
histories	O
of	O
the	O
web	B-Application
browsers	I-Application
,	O
the	O
World	O
Wide	O
Web	O
and	O
the	O
Internet	O
;	O
therefore	O
,	O
for	O
the	O
sake	O
of	O
clearness	O
and	O
understandability	O
,	O
some	O
key	O
historical	O
information	O
below	O
reported	O
may	O
be	O
similar	O
to	O
that	O
found	O
also	O
in	O
one	O
or	O
more	O
of	O
the	O
above-mentioned	O
history	O
articles	O
.	O
</s>
<s>
Between	O
late	O
1990	O
and	O
early	O
1991	O
the	O
project	O
resulted	O
in	O
Berners-Lee	O
and	O
his	O
developers	O
writing	O
and	O
testing	O
several	O
software	B-Application
libraries	O
along	O
with	O
three	O
programs	O
,	O
which	O
initially	O
ran	O
on	O
NeXTSTEP	B-Application
OS	I-Application
installed	O
on	O
NeXT	O
workstations	O
:	O
</s>
<s>
a	O
graphical	O
web	B-Application
browser	I-Application
,	O
called	O
WorldWideWeb	B-Language
;	O
</s>
<s>
a	O
portable	O
line	B-Protocol
mode	I-Protocol
web	I-Protocol
browser	I-Protocol
;	O
</s>
<s>
a	O
web	B-Application
server	I-Application
,	O
later	O
known	O
as	O
CERN	B-Application
httpd	I-Application
.	O
</s>
<s>
Those	O
early	O
browsers	B-Application
retrieved	O
web	O
pages	O
from	O
web	O
server(s )	O
using	O
a	O
new	O
basic	O
communication	O
protocol	O
that	O
was	O
named	O
HTTP	B-Protocol
0.9	I-Protocol
.	O
</s>
<s>
This	O
was	O
the	O
official	O
birth	O
of	O
CERN	B-Application
httpd	I-Application
.	O
</s>
<s>
This	O
was	O
a	O
very	O
important	O
event	O
because	O
it	O
started	O
trans-continental	O
web	O
communications	O
between	O
web	B-Application
browsers	I-Application
and	O
web	B-Application
servers	I-Application
.	O
</s>
<s>
In	O
1991-1993	O
CERN	O
web	B-Application
server	I-Application
program	B-Application
continued	O
to	O
be	O
actively	O
developed	O
by	O
the	O
www	O
group	O
,	O
meanwhile	O
,	O
thanks	O
to	O
the	O
availability	O
of	O
its	O
source	O
code	O
and	O
the	O
public	O
specifications	O
of	O
the	O
HTTP	B-Protocol
protocol	I-Protocol
,	O
many	O
other	O
implementations	O
of	O
web	B-Application
servers	I-Application
started	O
to	O
be	O
developed	O
.	O
</s>
<s>
In	O
April	O
1993	O
CERN	O
issued	O
a	O
public	O
official	O
statement	O
stating	O
that	O
the	O
three	O
components	O
of	O
Web	O
software	B-Application
(	O
the	O
basic	O
line-mode	O
client	O
,	O
the	O
web	B-Application
server	I-Application
and	O
the	O
library	O
of	O
common	O
code	O
)	O
,	O
along	O
with	O
their	O
source	O
code	O
,	O
were	O
put	O
in	O
the	O
public	O
domain	O
.	O
</s>
<s>
This	O
statement	O
freed	O
web	B-Application
server	I-Application
developers	O
from	O
any	O
possible	O
legal	O
issue	O
about	O
the	O
development	O
of	O
derivative	O
work	O
based	O
on	O
that	O
source	O
code	O
(	O
a	O
threat	O
that	O
in	O
practice	O
never	O
existed	O
)	O
.	O
</s>
<s>
At	O
the	O
beginning	O
of	O
1994	O
,	O
the	O
most	O
notable	O
among	O
new	O
web	B-Application
servers	I-Application
was	O
NCSA	B-Application
httpd	I-Application
which	O
ran	O
on	O
a	O
variety	O
of	O
Unix-based	O
OSs	O
and	O
could	O
serve	O
dynamically	O
generated	O
content	O
by	O
implementing	O
the	O
POST	O
HTTP	B-Protocol
method	O
and	O
the	O
CGI	B-Language
to	O
communicate	O
with	O
external	O
programs	O
.	O
</s>
<s>
These	O
capabilities	O
,	O
along	O
with	O
the	O
multimedia	O
features	O
of	O
NCSA	O
's	O
Mosaic	B-Application
browser	I-Application
(	O
also	O
able	O
to	O
manage	O
HTML	B-General_Concept
FORMs	I-General_Concept
in	O
order	O
to	O
send	O
data	O
to	O
a	O
web	B-Application
server	I-Application
)	O
highlighted	O
the	O
potential	O
of	O
web	O
technology	O
for	O
publishing	O
and	O
distributed	B-Architecture
computing	I-Architecture
applications	O
.	O
</s>
<s>
In	O
the	O
second	O
half	O
of	O
1994	O
,	O
the	O
development	O
of	O
NCSA	B-Application
httpd	I-Application
stalled	O
to	O
the	O
point	O
that	O
a	O
group	O
of	O
external	O
software	B-Application
developers	O
,	O
webmasters	O
and	O
other	O
professional	O
figures	O
interested	O
in	O
that	O
server	B-Application
,	O
started	O
to	O
write	O
and	O
collect	O
patches	O
thanks	O
to	O
the	O
NCSA	B-Application
httpd	I-Application
source	O
code	O
being	O
available	O
to	O
the	O
public	O
domain	O
.	O
</s>
<s>
At	O
the	O
beginning	O
of	O
1995	O
those	O
patches	O
were	O
all	O
applied	O
to	O
the	O
last	O
release	O
of	O
NCSA	O
source	O
code	O
and	O
,	O
after	O
several	O
tests	O
,	O
the	O
Apache	B-Application
HTTP	I-Application
server	I-Application
project	O
was	O
started	O
.	O
</s>
<s>
At	O
the	O
end	O
of	O
1994	O
a	O
new	O
commercial	O
web	B-Application
server	I-Application
,	O
named	O
Netsite	O
,	O
was	O
released	O
with	O
specific	O
features	O
.	O
</s>
<s>
It	O
was	O
the	O
first	O
one	O
of	O
many	O
other	O
similar	O
products	O
that	O
were	O
developed	O
first	O
by	O
Netscape	B-Protocol
,	O
then	O
also	O
by	O
Sun	O
Microsystems	O
,	O
and	O
finally	O
by	O
Oracle	B-Application
Corporation	I-Application
.	O
</s>
<s>
In	O
mid-1995	O
the	O
first	O
version	O
of	O
IIS	B-Application
was	O
released	O
,	O
for	O
Windows	B-Device
NT	I-Device
OS	B-General_Concept
,	O
by	O
Microsoft	O
.	O
</s>
<s>
This	O
marked	O
the	O
entry	O
,	O
in	O
the	O
field	O
of	O
World	O
Wide	O
Web	O
technologies	O
,	O
of	O
a	O
very	O
important	O
commercial	O
developer	O
and	O
vendor	O
that	O
has	O
played	O
and	O
still	O
is	O
playing	O
a	O
key	O
role	O
on	O
both	O
sides	O
(	O
client	O
and	O
server	B-Application
)	O
of	O
the	O
web	O
.	O
</s>
<s>
In	O
the	O
second	O
half	O
of	O
1995	O
CERN	O
and	O
NCSA	O
web	B-Application
servers	I-Application
started	O
to	O
decline	O
(	O
in	O
global	O
percentage	O
usage	O
)	O
because	O
of	O
the	O
widespread	O
adoption	O
of	O
new	O
web	B-Application
servers	I-Application
which	O
had	O
a	O
much	O
faster	O
development	O
cycle	O
along	O
with	O
more	O
features	O
,	O
more	O
fixes	O
applied	O
,	O
and	O
more	O
performances	O
than	O
the	O
previous	O
ones	O
.	O
</s>
<s>
At	O
the	O
end	O
of	O
1996	O
there	O
were	O
already	O
over	O
fifty	O
known	O
(	O
different	O
)	O
web	B-Application
server	I-Application
software	B-Application
programs	I-Application
that	O
were	O
available	O
to	O
everybody	O
who	O
wanted	O
to	O
own	O
an	O
Internet	O
domain	O
name	O
and/or	O
to	O
host	O
websites	O
.	O
</s>
<s>
Many	O
of	O
them	O
lived	O
only	O
shortly	O
and	O
were	O
replaced	O
by	O
other	O
web	B-Application
servers	I-Application
.	O
</s>
<s>
The	O
publication	O
of	O
RFCs	O
about	O
protocol	O
versions	O
HTTP/1.0	B-Protocol
(	O
1996	O
)	O
and	O
HTTP/1.1	B-Protocol
(	O
1997	O
,	O
1999	O
)	O
,	O
forced	O
most	O
web	B-Application
servers	I-Application
to	O
comply	O
(	O
not	O
always	O
completely	O
)	O
with	O
those	O
standards	O
.	O
</s>
<s>
The	O
use	O
of	O
TCP/IP	O
persistent	B-Protocol
connections	I-Protocol
(	O
HTTP/1.1	B-Protocol
)	O
required	O
web	B-Application
servers	I-Application
both	O
to	O
increase	O
a	O
lot	O
the	O
maximum	O
number	O
of	O
concurrent	O
connections	O
allowed	O
and	O
to	O
improve	O
their	O
level	O
of	O
scalability	B-Architecture
.	O
</s>
<s>
Between	O
1996	O
and	O
1999	O
Netscape	B-Application
Enterprise	I-Application
Server	I-Application
and	O
Microsoft	O
's	O
IIS	B-Application
emerged	O
among	O
the	O
leading	O
commercial	O
options	O
whereas	O
among	O
the	O
freely	O
available	O
and	O
open-source	B-License
programs	O
Apache	B-Application
HTTP	I-Application
Server	I-Application
held	O
the	O
lead	O
as	O
the	O
preferred	O
server	B-Application
(	O
because	O
of	O
its	O
reliability	O
and	O
its	O
many	O
features	O
)	O
.	O
</s>
<s>
In	O
those	O
years	O
there	O
was	O
also	O
another	O
commercial	O
,	O
highly	O
innovative	O
and	O
thus	O
notable	O
web	B-Application
server	I-Application
called	O
Zeus	B-Protocol
(	O
now	O
discontinued	O
)	O
that	O
was	O
known	O
as	O
one	O
of	O
the	O
fastest	O
and	O
most	O
scalable	B-Architecture
web	B-Application
servers	I-Application
available	O
on	O
market	O
,	O
at	O
least	O
till	O
the	O
first	O
decade	O
of	O
2000s	O
,	O
despite	O
its	O
low	O
percentage	O
of	O
usage	O
.	O
</s>
<s>
Apache	B-Application
resulted	O
in	O
the	O
most	O
used	O
web	B-Application
server	I-Application
from	O
mid-1996	O
to	O
the	O
end	O
of	O
2015	O
when	O
,	O
after	O
a	O
few	O
years	O
of	O
decline	O
,	O
it	O
was	O
surpassed	O
initially	O
by	O
IIS	B-Application
and	O
then	O
by	O
Nginx	B-Operating_System
.	O
</s>
<s>
Afterward	O
IIS	B-Application
dropped	O
to	O
much	O
lower	O
percentages	O
of	O
usage	O
than	O
Apache	B-Application
(	O
see	O
also	O
market	O
share	O
)	O
.	O
</s>
<s>
From	O
2005-2006	O
Apache	B-Application
started	O
to	O
improve	O
its	O
speed	O
and	O
its	O
scalability	B-Architecture
level	O
by	O
introducing	O
new	O
performance	O
features	O
(	O
e.g.	O
</s>
<s>
event	O
MPM	O
and	O
new	O
content	O
cache	B-Protocol
)	O
.	O
</s>
<s>
As	O
those	O
new	O
performance	O
improvements	O
initially	O
were	O
marked	O
as	O
experimental	O
,	O
they	O
were	O
not	O
enabled	O
by	O
its	O
users	O
for	O
a	O
long	O
time	O
and	O
so	O
Apache	B-Application
suffered	O
,	O
even	O
more	O
,	O
the	O
competition	O
of	O
commercial	O
servers	O
and	O
,	O
above	O
all	O
,	O
of	O
other	O
open-source	B-License
servers	O
which	O
meanwhile	O
had	O
already	O
achieved	O
far	O
superior	O
performances	O
(	O
mostly	O
when	O
serving	O
static	O
content	O
)	O
since	O
the	O
beginning	O
of	O
their	O
development	O
and	O
at	O
the	O
time	O
of	O
the	O
Apache	B-Application
decline	O
were	O
able	O
to	O
offer	O
also	O
a	O
long	O
enough	O
list	O
of	O
well	O
tested	O
advanced	O
features	O
.	O
</s>
<s>
In	O
fact	O
,	O
a	O
few	O
years	O
after	O
2000	O
started	O
,	O
not	O
only	O
other	O
commercial	O
and	O
highly	O
competitive	O
web	B-Application
servers	I-Application
,	O
e.g.	O
</s>
<s>
LiteSpeed	B-Protocol
,	O
but	O
also	O
many	O
other	O
open-source	B-License
programs	O
,	O
often	O
of	O
excellent	O
quality	O
and	O
very	O
high	O
performances	O
,	O
among	O
which	O
should	O
be	O
noted	O
Hiawatha	O
,	O
Cherokee	B-Language
HTTP	I-Language
server	I-Language
,	O
Lighttpd	B-Protocol
,	O
Nginx	B-Operating_System
and	O
other	O
derived/related	O
products	O
also	O
available	O
with	O
commercial	O
support	O
,	O
emerged	O
.	O
</s>
<s>
Around	O
2007-2008	O
most	O
popular	O
web	B-Application
browsers	I-Application
increased	O
their	O
previous	O
default	O
limit	O
of	O
2	O
persistent	B-Protocol
connections	I-Protocol
per	O
host-domain	O
(	O
a	O
limit	O
recommended	O
by	O
RFC-2616	O
)	O
to	O
4	O
,	O
6	O
or	O
8	O
persistent	B-Protocol
connections	I-Protocol
per	O
host-domain	O
,	O
in	O
order	O
to	O
speed	O
up	O
the	O
retrieval	O
of	O
heavy	O
web	O
pages	O
with	O
lots	O
of	O
images	O
,	O
and	O
to	O
mitigate	O
the	O
problem	O
of	O
the	O
shortage	O
of	O
persistent	B-Protocol
connections	I-Protocol
dedicated	O
to	O
dynamic	O
objects	O
used	O
for	O
bi-directional	O
notifications	O
of	O
events	O
in	O
web	O
pages	O
.	O
</s>
<s>
Within	O
a	O
year	O
,	O
these	O
changes	O
,	O
on	O
average	O
,	O
nearly	O
tripled	O
the	O
maximum	O
number	O
of	O
persistent	B-Protocol
connections	I-Protocol
that	O
web	B-Application
servers	I-Application
had	O
to	O
manage	O
.	O
</s>
<s>
This	O
trend	O
(	O
of	O
increasing	O
the	O
number	O
of	O
persistent	B-Protocol
connections	I-Protocol
)	O
definitely	O
gave	O
a	O
strong	O
impetus	O
to	O
the	O
adoption	O
of	O
reverse	B-General_Concept
proxies	I-General_Concept
in	O
front	O
of	O
slower	O
web	B-Application
servers	I-Application
and	O
it	O
gave	O
also	O
one	O
more	O
chance	O
to	O
the	O
emerging	O
new	O
web	B-Application
servers	I-Application
that	O
could	O
show	O
all	O
their	O
speed	O
and	O
their	O
capability	O
to	O
handle	O
very	O
high	O
numbers	O
of	O
concurrent	O
connections	O
without	O
requiring	O
too	O
many	O
hardware	B-Architecture
resources	O
(	O
expensive	O
computers	O
with	O
lots	O
of	O
CPUs	O
,	O
RAM	B-Architecture
and	O
fast	O
disks	B-Device
)	O
.	O
</s>
<s>
In	O
2015	O
,	O
RFCs	O
published	O
new	O
protocol	O
version	O
[HTTP/2],	O
and	O
as	O
the	O
implementation	O
of	O
new	O
specifications	O
was	O
not	O
trivial	O
at	O
all	O
,	O
a	O
dilemma	O
arose	O
among	O
developers	O
of	O
less	O
popular	O
web	B-Application
servers	I-Application
(	O
e.g.	O
</s>
<s>
with	O
a	O
percentage	O
of	O
usage	O
lower	O
than	O
1%	O
..	B-Application
2%	O
)	O
,	O
about	O
adding	O
or	O
not	O
adding	O
support	O
for	O
that	O
new	O
protocol	O
version	O
.	O
</s>
<s>
In	O
fact	O
supporting	O
HTTP/2	B-Protocol
often	O
required	O
radical	O
changes	O
to	O
their	O
internal	O
implementation	O
due	O
to	O
many	O
factors	O
(	O
practically	O
always	O
required	O
encrypted	O
connections	O
,	O
capability	O
to	O
distinguish	O
between	O
HTTP/1.x	O
and	O
HTTP/2	B-Protocol
connections	O
on	O
the	O
same	O
TCP	B-Protocol
port	O
,	O
binary	O
representation	O
of	O
HTTP	B-Protocol
messages	O
,	O
message	O
priority	O
,	O
compression	O
of	O
HTTP	B-Protocol
headers	I-Protocol
,	O
use	O
of	O
streams	O
also	O
known	O
as	O
TCP/IP	O
sub-connections	O
and	O
related	O
flow-control	O
,	O
etc	O
.	O
)	O
</s>
<s>
and	O
so	O
a	O
few	O
developers	O
of	O
those	O
web	B-Application
servers	I-Application
opted	O
for	O
not	O
supporting	O
new	O
HTTP/2	B-Protocol
version	O
(	O
at	O
least	O
in	O
the	O
near	O
future	O
)	O
also	O
because	O
of	O
these	O
main	O
reasons	O
:	O
</s>
<s>
protocols	O
HTTP/1.x	O
would	O
have	O
been	O
supported	O
anyway	O
by	O
browsers	B-Application
for	O
a	O
very	O
long	O
time	O
(	O
maybe	O
forever	O
)	O
so	O
that	O
there	O
would	O
be	O
no	O
incompatibility	O
between	O
clients	O
and	O
servers	O
in	O
next	O
future	O
;	O
</s>
<s>
implementing	O
HTTP/2	B-Protocol
was	O
considered	O
a	O
task	O
of	O
overwhelming	O
complexity	O
that	O
could	O
open	O
the	O
door	O
to	O
a	O
whole	O
new	O
class	O
of	O
bugs	B-Error_Name
that	O
till	O
2015	O
did	O
not	O
exist	O
and	O
so	O
it	O
would	O
have	O
required	O
notable	O
investments	O
in	O
developing	O
and	O
testing	O
the	O
implementation	O
of	O
the	O
new	O
protocol	O
;	O
</s>
<s>
adding	O
HTTP/2	B-Protocol
support	O
could	O
always	O
be	O
done	O
in	O
future	O
in	O
case	O
the	O
efforts	O
would	O
be	O
justified	O
.	O
</s>
<s>
Instead	O
,	O
developers	O
of	O
most	O
popular	O
web	B-Application
servers	I-Application
,	O
rushed	O
to	O
offer	O
the	O
availability	O
of	O
new	O
protocol	O
,	O
not	O
only	O
because	O
they	O
had	O
the	O
work	O
force	O
and	O
the	O
time	O
to	O
do	O
so	O
,	O
but	O
also	O
because	O
usually	O
their	O
previous	O
implementation	O
of	O
SPDY	B-Protocol
protocol	O
could	O
be	O
reused	O
as	O
a	O
starting	O
point	O
and	O
because	O
most	O
used	O
web	B-Application
browsers	I-Application
implemented	O
it	O
very	O
quickly	O
for	O
the	O
same	O
reason	O
.	O
</s>
<s>
Another	O
reason	O
that	O
prompted	O
those	O
developers	O
to	O
act	O
quickly	O
was	O
that	O
webmasters	O
felt	O
the	O
pressure	O
of	O
the	O
ever	O
increasing	O
web	O
traffic	O
and	O
they	O
really	O
wanted	O
to	O
install	O
and	O
to	O
try	O
-	O
as	O
soon	O
as	O
possible	O
-	O
something	O
that	O
could	O
drastically	O
lower	O
the	O
number	O
of	O
TCP/IP	O
connections	O
and	O
speedup	O
accesses	O
to	O
hosted	O
websites	O
.	O
</s>
<s>
In	O
2020	O
–	O
2021	O
the	O
HTTP/2	B-Protocol
dynamics	O
about	O
its	O
implementation	O
(	O
by	O
top	O
web	B-Application
servers	I-Application
and	O
popular	O
web	B-Application
browsers	I-Application
)	O
were	O
partly	O
replicated	O
after	O
the	O
publication	O
of	O
advanced	O
drafts	O
of	O
future	O
RFC	O
about	O
HTTP/3	B-Protocol
protocol	O
.	O
</s>
<s>
The	O
following	O
technical	O
overview	O
should	O
be	O
considered	O
only	O
as	O
an	O
attempt	O
to	O
give	O
a	O
few	O
very	O
limited	O
examples	O
about	O
some	O
features	O
that	O
may	O
be	O
implemented	O
in	O
a	O
web	B-Application
server	I-Application
and	O
some	O
of	O
the	O
tasks	O
that	O
it	O
may	O
perform	O
in	O
order	O
to	O
have	O
a	O
sufficiently	O
wide	O
scenario	O
about	O
the	O
topic	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
plays	O
the	O
role	O
of	O
a	O
server	B-Application
in	O
a	O
client	B-Operating_System
–	I-Operating_System
server	I-Operating_System
model	I-Operating_System
by	O
implementing	O
one	O
or	O
more	O
versions	O
of	O
HTTP	B-Protocol
protocol	I-Protocol
,	O
often	O
including	O
the	O
HTTPS	B-Protocol
secure	O
variant	O
and	O
other	O
features	O
and	O
extensions	O
that	O
are	O
considered	O
useful	O
for	O
its	O
planned	O
usage	O
.	O
</s>
<s>
The	O
complexity	O
and	O
the	O
efficiency	O
of	O
a	O
web	B-Application
server	I-Application
program	B-Application
may	O
vary	O
a	O
lot	O
depending	O
on	O
(	O
e.g.	O
</s>
<s>
performances	O
and	O
scalability	B-Architecture
level	O
aimed	O
as	O
a	O
goal	O
;	O
</s>
<s>
software	B-Application
model	O
and	O
techniques	O
adopted	O
to	O
achieve	O
wished	O
performance	O
and	O
scalability	B-Architecture
level	O
;	O
</s>
<s>
target	O
hardware	B-Architecture
and	O
category	O
of	O
usage	O
,	O
e.g.	O
</s>
<s>
embedded	B-Architecture
system	I-Architecture
,	O
low-medium	O
traffic	O
web	B-Application
server	I-Application
,	O
high	O
traffic	O
Internet	O
web	B-Application
server	I-Application
.	O
</s>
<s>
Although	O
web	B-Application
server	I-Application
programs	O
differ	O
in	O
how	O
they	O
are	O
implemented	O
,	O
most	O
of	O
them	O
offer	O
the	O
following	O
common	O
features	O
.	O
</s>
<s>
These	O
are	O
basic	O
features	O
that	O
most	O
web	B-Application
servers	I-Application
usually	O
have	O
.	O
</s>
<s>
Static	O
content	O
serving	O
:	O
to	O
be	O
able	O
to	O
serve	O
static	O
content	O
(	O
web	O
files	O
)	O
to	O
clients	O
via	O
HTTP	B-Protocol
protocol	I-Protocol
.	O
</s>
<s>
HTTP:	O
support	O
for	O
one	O
or	O
more	O
versions	O
of	O
HTTP	B-Protocol
protocol	I-Protocol
in	O
order	O
to	O
send	O
versions	O
of	O
HTTP	B-Protocol
responses	O
compatible	O
with	O
versions	O
of	O
client	O
HTTP	B-Protocol
requests	I-Protocol
,	O
e.g.	O
</s>
<s>
HTTP/1.0	B-Protocol
,	O
HTTP/1.1	B-Protocol
(	O
eventually	O
also	O
with	O
encrypted	O
connections	O
HTTPS	B-Protocol
)	O
,	O
plus	O
,	O
if	O
available	O
,	O
HTTP/2	B-Protocol
,	O
HTTP/3	B-Protocol
.	O
</s>
<s>
Logging	B-Application
:	O
usually	O
web	B-Application
servers	I-Application
have	O
also	O
the	O
capability	O
of	O
logging	B-Application
some	O
information	O
,	O
about	O
client	O
requests	O
and	O
server	B-Application
responses	O
,	O
to	O
log	B-Application
files	I-Application
for	O
security	O
and	O
statistical	O
purposes	O
.	O
</s>
<s>
Dynamic	O
content	O
serving	O
:	O
to	O
be	O
able	O
to	O
serve	O
dynamic	O
content	O
(	O
generated	O
on	O
the	O
fly	O
)	O
to	O
clients	O
via	O
HTTP	B-Protocol
protocol	I-Protocol
.	O
</s>
<s>
Virtual	O
hosting	O
:	O
to	O
be	O
able	O
to	O
serve	O
many	O
websites	O
(	O
domain	O
names	O
)	O
using	O
only	O
one	O
IP	B-Protocol
address	I-Protocol
.	O
</s>
<s>
Content	O
cache	B-Protocol
:	O
to	O
be	O
able	O
to	O
cache	B-Protocol
static	O
and/or	O
dynamic	O
content	O
in	O
order	O
to	O
speed	O
up	O
server	B-Application
responses	O
;	O
</s>
<s>
Large	B-Application
file	I-Application
support	I-Application
:	O
to	O
be	O
able	O
to	O
serve	O
files	O
whose	O
size	O
is	O
greater	O
than	O
2	O
GB	O
on	O
32	O
bit	O
OS	B-General_Concept
.	O
</s>
<s>
Rewrite	B-Protocol
engine	I-Protocol
:	O
to	O
map	O
parts	O
of	O
clean	B-Protocol
URLs	I-Protocol
(	O
found	O
in	O
client	O
requests	O
)	O
to	O
their	O
real	O
names	O
.	O
</s>
<s>
Custom	B-Protocol
error	I-Protocol
pages	I-Protocol
:	O
support	O
for	O
customized	O
HTTP	B-Protocol
error	I-Protocol
messages	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
,	O
when	O
it	O
is	O
running	O
,	O
usually	O
performs	O
several	O
general	O
tasks	O
,	O
(	O
e.g.	O
</s>
<s>
starts	O
,	O
optionally	O
reads	O
and	O
applies	O
settings	O
found	O
in	O
its	O
configuration	O
file(s )	O
or	O
elsewhere	O
,	O
optionally	O
opens	O
log	B-Application
file	I-Application
,	O
starts	O
listening	O
to	O
client	O
connections	O
/	O
requests	O
;	O
</s>
<s>
receives	O
client	O
requests	O
(	O
by	O
reading	O
HTTP	B-Protocol
messages	O
)	O
:	O
</s>
<s>
reads	O
and	O
verify	O
each	O
HTTP	B-Protocol
request	O
message	O
;	O
</s>
<s>
usually	O
performs	O
URL	B-Protocol
normalization	I-Protocol
;	O
</s>
<s>
executes	O
or	O
refuses	O
requested	O
HTTP	B-Protocol
method	O
:	O
</s>
<s>
optionally	O
manages	O
requests	O
for	O
static	O
resources	O
(	O
file	B-Operating_System
contents	O
)	O
:	O
</s>
<s>
optionally	O
manages	O
directory	B-Application
index	O
files	O
;	O
</s>
<s>
optionally	O
manages	O
directory	B-Application
listings	O
;	O
</s>
<s>
optionally	O
manages	O
program	B-Application
or	O
module	O
processing	O
,	O
checking	O
the	O
availability	O
,	O
the	O
start	O
and	O
eventually	O
the	O
stop	O
of	O
the	O
execution	O
of	O
external	O
programs	O
used	O
to	O
generate	O
dynamic	O
content	O
;	O
</s>
<s>
replies	O
to	O
client	O
requests	O
sending	O
proper	O
HTTP	B-Protocol
responses	O
(	O
e.g.	O
</s>
<s>
requested	O
resources	O
or	O
error	O
messages	O
)	O
eventually	O
verifying	O
or	O
adding	O
HTTP	B-Protocol
headers	I-Protocol
to	O
those	O
sent	O
by	O
dynamic	O
programs	O
/	O
modules	O
;	O
</s>
<s>
optionally	O
logs	O
(	O
partially	O
or	O
totally	O
)	O
client	O
requests	O
and/or	O
its	O
responses	O
to	O
an	O
external	O
user	O
log	B-Application
file	I-Application
or	O
to	O
a	O
system	B-Application
log	I-Application
file	I-Application
by	O
syslog	B-Protocol
,	O
usually	O
using	O
common	O
log	O
format	O
;	O
</s>
<s>
optionally	O
logs	O
process	B-Operating_System
messages	O
about	O
detected	O
anomalies	O
or	O
other	O
notable	O
events	O
(	O
e.g.	O
</s>
<s>
in	O
client	O
requests	O
or	O
in	O
its	O
internal	O
functioning	O
)	O
using	O
syslog	B-Protocol
or	O
some	O
other	O
system	O
facilities	O
;	O
these	O
log	O
messages	O
usually	O
have	O
a	O
debug	O
,	O
warning	O
,	O
error	O
,	O
alert	O
level	O
which	O
can	O
be	O
filtered	O
(	O
not	O
logged	O
)	O
depending	O
on	O
some	O
settings	O
,	O
see	O
also	O
severity	O
level	O
;	O
</s>
<s>
Web	B-Application
server	I-Application
programs	O
are	O
able	O
:	O
</s>
<s>
to	O
read	O
an	O
HTTP	B-Protocol
request	O
message	O
;	O
</s>
<s>
to	O
identify	O
known	O
HTTP	B-Protocol
headers	I-Protocol
and	O
to	O
extract	O
their	O
values	O
from	O
them	O
.	O
</s>
<s>
Once	O
an	O
HTTP	B-Protocol
request	O
message	O
has	O
been	O
decoded	O
and	O
verified	O
,	O
its	O
values	O
can	O
be	O
used	O
to	O
determine	O
whether	O
that	O
request	O
can	O
be	O
satisfied	O
or	O
not	O
.	O
</s>
<s>
Web	B-Application
server	I-Application
programs	O
usually	O
perform	O
some	O
type	O
of	O
URL	B-Protocol
normalization	I-Protocol
(	O
URL	O
found	O
in	O
most	O
HTTP	B-Protocol
request	O
messages	O
)	O
in	O
order	O
:	O
</s>
<s>
to	O
make	O
resource	O
path	O
always	O
a	O
clean	O
uniform	O
path	O
from	O
root	O
directory	B-Application
of	O
website	O
;	O
</s>
<s>
by	O
intercepting	O
more	O
easily	O
attempts	O
to	O
access	O
static	O
resources	O
outside	O
the	O
root	O
directory	B-Application
of	O
the	O
website	O
or	O
to	O
access	O
to	O
portions	O
of	O
path	O
below	O
website	O
root	O
directory	B-Application
that	O
are	O
forbidden	O
or	O
which	O
require	O
authorization	O
)	O
;	O
</s>
<s>
to	O
make	O
path	O
of	O
web	O
resources	O
more	O
recognizable	O
by	O
human	O
beings	O
and	O
web	B-Application
log	I-Application
analysis	I-Application
programs	I-Application
(	O
also	O
known	O
as	O
log	O
analyzers	O
/	O
statistical	O
applications	O
)	O
.	O
</s>
<s>
The	O
term	O
URL	B-Protocol
normalization	I-Protocol
refers	O
to	O
the	O
process	B-Operating_System
of	O
modifying	O
and	O
standardizing	O
a	O
URL	O
in	O
a	O
consistent	O
manner	O
.	O
</s>
<s>
and	O
"	O
..	B-Application
"	O
path	O
segments	O
and	O
adding	O
trailing	O
slashes	O
to	O
a	O
non-empty	O
path	O
component	O
.	O
</s>
<s>
"	O
URL	O
mapping	O
is	O
the	O
process	B-Operating_System
by	O
which	O
a	O
URL	O
is	O
analyzed	O
to	O
figure	O
out	O
what	O
resource	O
it	O
is	O
referring	O
to	O
,	O
so	O
that	O
that	O
resource	O
can	O
be	O
returned	O
to	O
the	O
requesting	O
client	O
.	O
</s>
<s>
This	O
process	B-Operating_System
is	O
performed	O
with	O
every	O
request	O
that	O
is	O
made	O
to	O
a	O
web	B-Application
server	I-Application
,	O
with	O
some	O
of	O
the	O
requests	O
being	O
served	O
with	O
a	O
file	B-Operating_System
,	O
such	O
as	O
an	O
HTML	B-Language
document	O
,	O
or	O
a	O
gif	O
image	O
,	O
others	O
with	O
the	O
results	O
of	O
running	O
a	O
CGI	B-Language
program	B-Application
,	O
and	O
others	O
by	O
some	O
other	O
process	B-Operating_System
,	O
such	O
as	O
a	O
built-in	O
module	O
handler	O
,	O
a	O
PHP	B-Application
document	O
,	O
or	O
a	O
Java	O
servlet.	O
"	O
</s>
<s>
In	O
practice	O
,	O
web	B-Application
server	I-Application
programs	O
that	O
implement	O
advanced	O
features	O
,	O
beyond	O
the	O
simple	O
static	O
content	O
serving	O
(	O
e.g.	O
</s>
<s>
URL	O
rewrite	B-Protocol
engine	I-Protocol
,	O
dynamic	O
content	O
serving	O
)	O
,	O
usually	O
have	O
to	O
figure	O
out	O
how	O
that	O
URL	O
has	O
to	O
be	O
handled	O
,	O
e.g.	O
</s>
<s>
as	O
a	O
static	O
request	O
of	O
file	B-Operating_System
content	O
;	O
</s>
<s>
directory	B-Application
listing	O
of	O
files	O
or	O
other	O
sub-directories	O
contained	O
in	O
that	O
directory	B-Application
;	O
</s>
<s>
other	O
types	O
of	O
dynamic	O
request	O
in	O
order	O
to	O
identify	O
the	O
program	B-Application
/	O
module	O
processor	O
able	O
to	O
handle	O
that	O
kind	O
of	O
URL	O
path	O
and	O
to	O
pass	O
to	O
it	O
other	O
URL	O
parts	O
,	O
i.e.	O
</s>
<s>
usually	O
path-info	O
and	O
query	B-Protocol
string	I-Protocol
variables	O
.	O
</s>
<s>
One	O
or	O
more	O
configuration	B-Protocol
files	I-Protocol
of	O
web	B-Application
server	I-Application
may	O
specify	O
the	O
mapping	O
of	O
parts	O
of	O
URL	O
path	O
(	O
e.g.	O
</s>
<s>
initial	O
parts	O
of	O
file	B-Application
path	I-Application
,	O
filename	O
extension	O
and	O
other	O
path	O
components	O
)	O
to	O
a	O
specific	O
URL	O
handler	O
(	O
file	B-Operating_System
,	O
directory	B-Application
,	O
external	O
program	B-Application
or	O
internal	O
module	O
)	O
.	O
</s>
<s>
When	O
a	O
web	B-Application
server	I-Application
implements	O
one	O
or	O
more	O
of	O
the	O
above-mentioned	O
advanced	O
features	O
then	O
the	O
path	O
part	O
of	O
a	O
valid	O
URL	O
may	O
not	O
always	O
match	O
an	O
existing	O
file	B-Application
system	I-Application
path	O
under	O
website	O
directory	B-Application
tree	I-Application
(	O
a	O
file	B-Operating_System
or	O
a	O
directory	B-Application
in	O
file	B-Application
system	I-Application
)	O
because	O
it	O
can	O
refer	O
to	O
a	O
virtual	O
name	O
of	O
an	O
internal	O
or	O
external	O
module	O
processor	O
for	O
dynamic	O
requests	O
.	O
</s>
<s>
Web	B-Application
server	I-Application
programs	O
are	O
able	O
to	O
translate	O
an	O
URL	O
path	O
(	O
all	O
or	O
part	O
of	O
it	O
)	O
,	O
that	O
refers	O
to	O
a	O
physical	O
file	B-Application
system	I-Application
path	O
,	O
to	O
an	O
absolute	B-Application
path	I-Application
under	O
the	O
target	O
website	O
's	O
root	O
directory	B-Application
.	O
</s>
<s>
Website	O
's	O
root	O
directory	B-Application
may	O
be	O
specified	O
by	O
a	O
configuration	B-Protocol
file	I-Protocol
or	O
by	O
some	O
internal	O
rule	O
of	O
the	O
web	B-Application
server	I-Application
by	O
using	O
the	O
name	O
of	O
the	O
website	O
which	O
is	O
the	O
host	O
part	O
of	O
the	O
URL	O
found	O
in	O
HTTP	B-Application
client	I-Application
request	O
.	O
</s>
<s>
Path	O
translation	O
to	O
file	B-Application
system	I-Application
is	O
done	O
for	O
the	O
following	O
types	O
of	O
web	O
resources	O
:	O
</s>
<s>
a	O
local	O
,	O
usually	O
non-executable	O
,	O
file	B-Operating_System
(	O
static	O
request	O
for	O
file	B-Operating_System
content	O
)	O
;	O
</s>
<s>
a	O
local	O
directory	B-Application
(	O
dynamic	O
request	O
:	O
directory	B-Application
listing	O
generated	O
on	O
the	O
fly	O
)	O
;	O
</s>
<s>
a	O
program	B-Application
name	O
(	O
dynamic	O
requests	O
that	O
is	O
executed	O
using	O
CGI	B-Language
or	O
SCGI	B-Protocol
interface	O
and	O
whose	O
output	O
is	O
read	O
by	O
web	B-Application
server	I-Application
and	O
resent	O
to	O
client	O
who	O
made	O
the	O
HTTP	B-Protocol
request	O
)	O
.	O
</s>
<s>
The	O
web	B-Application
server	I-Application
appends	O
the	O
path	O
found	O
in	O
requested	O
URL	O
(	O
HTTP	B-Protocol
request	O
message	O
)	O
and	O
appends	O
it	O
to	O
the	O
path	O
of	O
the	O
(	O
Host	O
)	O
website	O
root	O
directory	B-Application
.	O
</s>
<s>
On	O
an	O
Apache	B-Application
server	I-Application
,	O
this	O
is	O
commonly	O
/home/www/website	O
(	O
on	O
Unix	B-Application
machines	O
,	O
usually	O
it	O
is	O
:	O
/var/www/website	O
)	O
.	O
</s>
<s>
Example	O
of	O
a	O
static	O
request	O
of	O
an	O
existing	O
file	B-Operating_System
specified	O
by	O
the	O
following	O
URL	O
:	O
</s>
<s>
The	O
client	O
's	O
user	B-Protocol
agent	I-Protocol
connects	O
to	O
www.example.com	O
and	O
then	O
sends	O
the	O
following	O
HTTP/1.1	B-Protocol
request	O
:	O
</s>
<s>
The	O
result	O
is	O
the	O
local	O
file	B-Application
system	I-Application
resource	O
:	O
</s>
<s>
The	O
web	B-Application
server	I-Application
then	O
reads	O
the	O
file	B-Operating_System
,	O
if	O
it	O
exists	O
,	O
and	O
sends	O
a	O
response	O
to	O
the	O
client	O
's	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
The	O
response	O
will	O
describe	O
the	O
content	O
of	O
the	O
file	B-Operating_System
and	O
contain	O
the	O
file	B-Operating_System
itself	O
or	O
an	O
error	B-Protocol
message	I-Protocol
will	O
return	O
saying	O
that	O
the	O
file	B-Operating_System
does	O
not	O
exist	O
or	O
its	O
access	O
is	O
forbidden	O
.	O
</s>
<s>
Example	O
of	O
an	O
implicit	O
dynamic	O
request	O
of	O
an	O
existing	O
directory	B-Application
specified	O
by	O
the	O
following	O
URL	O
:	O
</s>
<s>
The	O
client	O
's	O
user	B-Protocol
agent	I-Protocol
connects	O
to	O
www.example.com	O
and	O
then	O
sends	O
the	O
following	O
HTTP/1.1	B-Protocol
request	O
:	O
</s>
<s>
The	O
result	O
is	O
the	O
local	O
directory	B-Application
path	I-Application
:	O
</s>
<s>
The	O
web	B-Application
server	I-Application
then	O
verifies	O
the	O
existence	O
of	O
the	O
directory	B-Application
and	O
if	O
it	O
exists	O
and	O
it	O
can	O
be	O
accessed	O
then	O
tries	O
to	O
find	O
out	O
an	O
index	O
file	B-Operating_System
(	O
which	O
in	O
this	O
case	O
does	O
not	O
exist	O
)	O
and	O
so	O
it	O
passes	O
the	O
request	O
to	O
an	O
internal	O
module	O
or	O
a	O
program	B-Application
dedicated	O
to	O
directory	B-Application
listings	O
and	O
finally	O
reads	O
data	O
output	O
and	O
sends	O
a	O
response	O
to	O
the	O
client	O
's	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
The	O
response	O
will	O
describe	O
the	O
content	O
of	O
the	O
directory	B-Application
(	O
list	O
of	O
contained	O
subdirectories	B-Application
and	O
files	O
)	O
or	O
an	O
error	B-Protocol
message	I-Protocol
will	O
return	O
saying	O
that	O
the	O
directory	B-Application
does	O
not	O
exist	O
or	O
its	O
access	O
is	O
forbidden	O
.	O
</s>
<s>
For	O
a	O
dynamic	O
request	O
the	O
URL	O
path	O
specified	O
by	O
the	O
client	O
should	O
refer	O
to	O
an	O
existing	O
external	O
program	B-Application
(	O
usually	O
an	O
executable	O
file	B-Operating_System
with	O
a	O
CGI	B-Language
)	O
used	O
by	O
the	O
web	B-Application
server	I-Application
to	O
generate	O
dynamic	O
content	O
.	O
</s>
<s>
Example	O
of	O
a	O
dynamic	O
request	O
using	O
a	O
program	B-Application
file	I-Application
to	O
generate	O
output	O
:	O
</s>
<s>
The	O
client	O
's	O
user	B-Protocol
agent	I-Protocol
connects	O
to	O
www.example.com	O
and	O
then	O
sends	O
the	O
following	O
HTTP/1.1	B-Protocol
request	O
:	O
</s>
<s>
The	O
result	O
is	O
the	O
local	O
file	B-Application
path	I-Application
of	O
the	O
program	B-Application
(	O
in	O
this	O
example	O
,	O
a	O
PHP	B-Application
program	B-Application
)	O
:	O
</s>
<s>
The	O
web	B-Application
server	I-Application
executes	O
that	O
program	B-Application
,	O
passing	O
in	O
the	O
path-info	O
and	O
the	O
query	B-Protocol
string	I-Protocol
action	O
=	O
view&orderby	O
=	O
thread&date	O
=	O
2021-10-15	O
so	O
that	O
the	O
program	B-Application
has	O
the	O
info	O
it	O
needs	O
to	O
run	O
.	O
</s>
<s>
(	O
In	O
this	O
case	O
,	O
it	O
will	O
return	O
an	O
HTML	B-Language
document	O
containing	O
a	O
view	O
of	O
forum	O
entries	O
ordered	O
by	O
thread	B-Operating_System
from	O
October	O
15th	O
,	O
2021	O
)	O
.	O
</s>
<s>
In	O
addition	O
to	O
this	O
,	O
the	O
web	B-Application
server	I-Application
reads	O
data	O
sent	O
from	O
the	O
external	O
program	B-Application
and	O
resends	O
that	O
data	O
to	O
the	O
client	O
that	O
made	O
the	O
request	O
.	O
</s>
<s>
Once	O
a	O
request	O
has	O
been	O
read	O
,	O
interpreted	O
,	O
and	O
verified	O
,	O
it	O
has	O
to	O
be	O
managed	O
depending	O
on	O
its	O
method	O
,	O
its	O
URL	O
,	O
and	O
its	O
parameters	O
,	O
which	O
may	O
include	O
values	O
of	O
HTTP	B-Protocol
headers	I-Protocol
.	O
</s>
<s>
In	O
practice	O
,	O
the	O
web	B-Application
server	I-Application
has	O
to	O
handle	O
the	O
request	O
by	O
using	O
one	O
of	O
these	O
response	O
paths	O
:	O
</s>
<s>
if	O
something	O
in	O
request	O
was	O
not	O
acceptable	O
(	O
in	O
status	O
line	O
or	O
message	O
headers	O
)	O
,	O
web	B-Application
server	I-Application
already	O
sent	O
an	O
error	O
response	O
;	O
</s>
<s>
OPTIONS	O
)	O
that	O
can	O
be	O
satisfied	O
by	O
general	O
code	O
of	O
web	B-Application
server	I-Application
then	O
a	O
successful	O
response	O
is	O
sent	O
;	O
</s>
<s>
if	O
URL	O
requires	O
authorization	O
then	O
an	O
authorization	O
error	B-Protocol
message	I-Protocol
is	O
sent	O
;	O
</s>
<s>
if	O
URL	O
maps	O
to	O
a	O
dynamic	O
resource	O
(	O
a	O
virtual	O
path	O
or	O
a	O
directory	B-Application
listing	O
)	O
then	O
its	O
handler	O
(	O
an	O
internal	O
module	O
or	O
an	O
external	O
program	B-Application
)	O
is	O
called	O
and	O
request	O
parameters	O
(	O
query	B-Protocol
string	I-Protocol
and	O
path	O
info	O
)	O
are	O
passed	O
to	O
it	O
in	O
order	O
to	O
allow	O
it	O
to	O
reply	O
to	O
that	O
request	O
;	O
</s>
<s>
if	O
URL	O
maps	O
to	O
a	O
static	O
resource	O
(	O
usually	O
a	O
file	B-Operating_System
on	O
file	B-Application
system	I-Application
)	O
then	O
the	O
internal	O
static	O
handler	O
is	O
called	O
to	O
send	O
that	O
file	B-Operating_System
;	O
</s>
<s>
resource	O
not	B-Protocol
found	I-Protocol
,	O
internal	O
server	B-Application
error	O
,	O
etc	O
.	O
)	O
</s>
<s>
If	O
a	O
web	B-Application
server	I-Application
program	B-Application
is	O
capable	O
of	O
serving	O
static	O
content	O
and	O
it	O
has	O
been	O
configured	O
to	O
do	O
so	O
,	O
then	O
it	O
is	O
able	O
to	O
send	O
file	B-Operating_System
content	O
whenever	O
a	O
request	O
message	O
has	O
a	O
valid	O
URL	O
path	O
matching	O
(	O
after	O
URL	O
mapping	O
,	O
URL	O
translation	O
and	O
URL	O
redirection	O
)	O
that	O
of	O
an	O
existing	O
file	B-Operating_System
under	O
the	O
root	O
directory	B-Application
of	O
a	O
website	O
and	O
file	B-Operating_System
has	O
attributes	O
which	O
match	O
those	O
required	O
by	O
internal	O
rules	O
of	O
web	B-Application
server	I-Application
program	B-Application
.	O
</s>
<s>
That	O
kind	O
of	O
content	O
is	O
called	O
static	O
because	O
usually	O
it	O
is	O
not	O
changed	O
by	O
the	O
web	B-Application
server	I-Application
when	O
it	O
is	O
sent	O
to	O
clients	O
and	O
because	O
it	O
remains	O
the	O
same	O
until	O
it	O
is	O
modified	O
(	O
file	B-Operating_System
modification	O
)	O
by	O
some	O
program	B-Application
.	O
</s>
<s>
NOTE	O
:	O
when	O
serving	O
static	O
content	O
only	O
,	O
a	O
web	B-Application
server	I-Application
program	B-Application
usually	O
does	O
not	O
change	O
file	B-Operating_System
contents	O
of	O
served	O
websites	O
(	O
as	O
they	O
are	O
only	O
read	O
and	O
never	O
written	O
)	O
and	O
so	O
it	O
suffices	O
to	O
support	O
only	O
these	O
HTTP	B-Protocol
methods	O
:	O
</s>
<s>
Response	O
of	O
static	O
file	B-Operating_System
content	O
can	O
be	O
sped	O
up	O
by	O
a	O
file	B-Operating_System
cache	B-Protocol
.	O
</s>
<s>
If	O
a	O
web	B-Application
server	I-Application
program	B-Application
receives	O
a	O
client	O
request	O
message	O
with	O
an	O
URL	O
whose	O
path	O
matches	O
one	O
of	O
an	O
existing	O
directory	B-Application
and	O
that	O
directory	B-Application
is	O
accessible	O
and	O
serving	O
directory	B-Application
index	O
file(s )	O
is	O
enabled	O
then	O
a	O
web	B-Application
server	I-Application
program	B-Application
may	O
try	O
to	O
serve	O
the	O
first	O
of	O
known	O
(	O
or	O
configured	O
)	O
static	O
index	O
file	B-Operating_System
names	O
(	O
a	O
regular	O
file	B-Operating_System
)	O
found	O
in	O
that	O
directory	B-Application
;	O
if	O
no	O
index	O
file	B-Operating_System
is	O
found	O
or	O
other	O
conditions	O
are	O
not	O
met	O
then	O
an	O
error	B-Protocol
message	I-Protocol
is	O
returned	O
.	O
</s>
<s>
Most	O
used	O
names	O
for	O
static	O
index	O
files	O
are	O
:	O
index.html	O
,	O
index.htm	O
and	O
Default.htm	O
.	O
</s>
<s>
If	O
a	O
web	B-Application
server	I-Application
program	B-Application
receives	O
a	O
client	O
request	O
message	O
with	O
an	O
URL	O
whose	O
path	O
matches	O
the	O
file	B-Operating_System
name	O
of	O
an	O
existing	O
file	B-Operating_System
and	O
that	O
file	B-Operating_System
is	O
accessible	O
by	O
web	B-Application
server	I-Application
program	B-Application
and	O
its	O
attributes	O
match	O
internal	O
rules	O
of	O
web	B-Application
server	I-Application
program	B-Application
,	O
then	O
web	B-Application
server	I-Application
program	B-Application
can	O
send	O
that	O
file	B-Operating_System
to	O
client	O
.	O
</s>
<s>
Usually	O
,	O
for	O
security	O
reasons	O
,	O
most	O
web	B-Application
server	I-Application
programs	O
are	O
pre-configured	O
to	O
serve	O
only	O
regular	O
files	O
or	O
to	O
avoid	O
to	O
use	O
special	B-Application
file	I-Application
types	O
like	O
device	B-Application
files	I-Application
,	O
along	O
with	O
symbolic	B-Application
links	I-Application
or	O
hard	B-Application
links	I-Application
to	O
them	O
.	O
</s>
<s>
If	O
a	O
web	B-Application
server	I-Application
program	B-Application
is	O
capable	O
of	O
serving	O
dynamic	O
content	O
and	O
it	O
has	O
been	O
configured	O
to	O
do	O
so	O
,	O
then	O
it	O
is	O
able	O
to	O
communicate	O
with	O
the	O
proper	O
internal	O
module	O
or	O
external	O
program	B-Application
(	O
associated	O
with	O
the	O
requested	O
URL	O
path	O
)	O
in	O
order	O
to	O
pass	O
to	O
it	O
parameters	O
of	O
client	O
request	O
;	O
after	O
that	O
,	O
web	B-Application
server	I-Application
program	B-Application
reads	O
from	O
it	O
its	O
data	O
response	O
(	O
that	O
it	O
has	O
generated	O
,	O
often	O
on	O
the	O
fly	O
)	O
and	O
then	O
it	O
resends	O
it	O
to	O
the	O
client	O
program	B-Application
who	O
made	O
the	O
request	O
.	O
</s>
<s>
NOTE	O
:	O
when	O
serving	O
static	O
and	O
dynamic	O
content	O
,	O
a	O
web	B-Application
server	I-Application
program	B-Application
usually	O
has	O
to	O
support	O
also	O
the	O
following	O
HTTP	B-Protocol
method	O
in	O
order	O
to	O
be	O
able	O
to	O
safely	O
receive	O
data	O
from	O
client(s )	O
and	O
so	O
to	O
be	O
able	O
to	O
host	O
also	O
websites	O
with	O
interactive	O
form(s )	O
that	O
may	O
send	O
large	O
data	O
sets	O
(	O
e.g.	O
</s>
<s>
lots	O
of	O
data	B-General_Concept
entry	I-General_Concept
or	O
file	B-Application
uploads	I-Application
)	O
to	O
web	B-Application
server	I-Application
/	O
external	O
programs	O
/	O
modules	O
:	O
</s>
<s>
In	O
order	O
to	O
be	O
able	O
to	O
communicate	O
with	O
its	O
internal	O
modules	O
and/or	O
external	O
programs	O
,	O
a	O
web	B-Application
server	I-Application
program	B-Application
must	O
have	O
implemented	O
one	O
or	O
more	O
of	O
the	O
many	O
available	O
gateway	O
interface(s )	O
(	O
see	O
also	O
Web	B-Language
Server	I-Language
Gateway	I-Language
Interfaces	I-Language
used	O
for	O
dynamic	O
content	O
)	O
.	O
</s>
<s>
An	O
external	O
CGI	B-Language
program	B-Application
is	O
run	O
by	O
web	B-Application
server	I-Application
program	B-Application
for	O
each	O
dynamic	O
request	O
,	O
then	O
web	B-Application
server	I-Application
program	B-Application
reads	O
from	O
it	O
the	O
generated	O
data	O
response	O
and	O
then	O
resends	O
it	O
to	O
client	O
.	O
</s>
<s>
An	O
external	O
SCGI	B-Protocol
program	B-Application
(	O
it	O
usually	O
is	O
a	O
process	B-Operating_System
)	O
is	O
started	O
once	O
by	O
web	B-Application
server	I-Application
program	B-Application
or	O
by	O
some	O
other	O
program	B-Application
/	O
process	B-Operating_System
and	O
then	O
it	O
waits	O
for	O
network	O
connections	O
;	O
every	O
time	O
there	O
is	O
a	O
new	O
request	O
for	O
it	O
,	O
web	B-Application
server	I-Application
program	B-Application
makes	O
a	O
new	O
network	O
connection	O
to	O
it	O
in	O
order	O
to	O
send	O
request	O
parameters	O
and	O
to	O
read	O
its	O
data	O
response	O
,	O
then	O
network	O
connection	O
is	O
closed	O
.	O
</s>
<s>
An	O
external	O
FastCGI	O
program	B-Application
(	O
it	O
usually	O
is	O
a	O
process	B-Operating_System
)	O
is	O
started	O
once	O
by	O
web	B-Application
server	I-Application
program	B-Application
or	O
by	O
some	O
other	O
program	B-Application
/	O
process	B-Operating_System
and	O
then	O
it	O
waits	O
for	O
a	O
network	O
connection	O
which	O
is	O
established	O
permanently	O
by	O
web	B-Application
server	I-Application
;	O
through	O
that	O
connection	O
are	O
sent	O
the	O
request	O
parameters	O
and	O
read	O
data	O
responses	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
may	O
be	O
capable	O
to	O
manage	O
the	O
dynamic	O
generation	O
(	O
on	O
the	O
fly	O
)	O
of	O
a	O
directory	B-Application
index	O
list	O
of	O
files	O
and	O
sub-directories	O
.	O
</s>
<s>
If	O
a	O
web	B-Application
server	I-Application
program	B-Application
is	O
configured	O
to	O
do	O
so	O
and	O
a	O
requested	O
URL	O
path	O
matches	O
an	O
existing	O
directory	B-Application
and	O
its	O
access	O
is	O
allowed	O
and	O
no	O
static	O
index	O
file	B-Operating_System
is	O
found	O
under	O
that	O
directory	B-Application
then	O
a	O
web	O
page	O
(	O
usually	O
in	O
HTML	B-Language
format	O
)	O
,	O
containing	O
the	O
list	O
of	O
files	O
and/or	O
subdirectories	B-Application
of	O
above	O
mentioned	O
directory	B-Application
,	O
is	O
dynamically	O
generated	O
(	O
on	O
the	O
fly	O
)	O
.	O
</s>
<s>
Some	O
web	B-Application
server	I-Application
programs	O
allow	O
the	O
customization	O
of	O
directory	B-Application
listings	O
by	O
allowing	O
the	O
usage	O
of	O
a	O
web	O
page	O
template	O
(	O
an	O
HTML	B-Language
document	O
containing	O
placeholders	O
,	O
e.g.	O
</s>
<s>
$( FILE_NAME	O
)	O
,	O
$( FILE_SIZE	O
)	O
,	O
etc.	O
,	O
that	O
are	O
replaced	O
with	O
the	O
field	O
values	O
of	O
each	O
file	B-Operating_System
entry	O
found	O
in	O
directory	B-Application
by	O
web	B-Application
server	I-Application
)	O
,	O
e.g.	O
</s>
<s>
index.tpl	O
or	O
the	O
usage	O
of	O
HTML	B-Language
and	O
embedded	O
source	O
code	O
that	O
is	O
interpreted	O
and	O
executed	O
on	O
the	O
fly	O
,	O
e.g.	O
</s>
<s>
index.asp	O
,	O
and	O
/	O
or	O
by	O
supporting	O
the	O
usage	O
of	O
dynamic	O
index	O
programs	O
such	O
as	O
CGIs	O
,	O
SCGIs	B-Protocol
,	O
FCGIs	O
,	O
e.g.	O
</s>
<s>
index.cgi	O
,	O
index.php	O
,	O
index.fcgi	O
.	O
</s>
<s>
Usage	O
of	O
dynamically	O
generated	O
directory	B-Application
listings	O
is	O
usually	O
avoided	O
or	O
limited	O
to	O
a	O
few	O
selected	O
directories	B-Application
of	O
a	O
website	O
because	O
that	O
generation	O
takes	O
much	O
more	O
OS	B-General_Concept
resources	O
than	O
sending	O
a	O
static	O
index	O
page	O
.	O
</s>
<s>
The	O
main	O
usage	O
of	O
directory	B-Application
listings	O
is	O
to	O
allow	O
the	O
download	O
of	O
files	O
(	O
usually	O
when	O
their	O
names	O
,	O
sizes	O
,	O
modification	O
date-times	O
or	O
file	B-Application
attributes	I-Application
may	O
change	O
randomly	O
/	O
frequently	O
)	O
as	O
they	O
are	O
,	O
without	O
requiring	O
to	O
provide	O
further	O
information	O
to	O
requesting	O
user	O
.	O
</s>
<s>
An	O
external	O
program	B-Application
or	O
an	O
internal	O
module	O
(	O
processing	O
unit	O
)	O
can	O
execute	O
some	O
sort	O
of	O
application	O
function	O
that	O
may	O
be	O
used	O
to	O
get	O
data	O
from	O
or	O
to	O
store	O
data	O
to	O
one	O
or	O
more	O
data	B-Protocol
repositories	I-Protocol
,	O
e.g.	O
</s>
<s>
files	O
(	O
file	B-Application
system	I-Application
)	O
;	O
</s>
<s>
HTML	B-Language
,	O
XML	B-Protocol
,	O
etc	O
.	O
</s>
<s>
that	O
may	O
be	O
used	O
to	O
update	O
one	O
or	O
more	O
values	O
displayed	O
by	O
a	O
dynamic	O
page	O
(	O
DHTML	B-General_Concept
)	O
of	O
a	O
web	O
interface	O
and	O
that	O
maybe	O
was	O
requested	O
by	O
an	O
XMLHttpRequest	B-Protocol
API	B-General_Concept
(	O
see	O
also	O
:	O
dynamic	O
page	O
)	O
.	O
</s>
<s>
Web	B-Application
server	I-Application
programs	O
are	O
able	O
to	O
send	O
response	O
messages	O
as	O
replies	O
to	O
client	O
request	O
messages	O
.	O
</s>
<s>
NOTE	O
:	O
the	O
following	O
sections	O
are	O
reported	O
only	O
as	O
examples	O
to	O
help	O
to	O
understand	O
what	O
a	O
web	B-Application
server	I-Application
,	O
more	O
or	O
less	O
,	O
does	O
;	O
these	O
sections	O
are	O
by	O
any	O
means	O
neither	O
exhaustive	O
nor	O
complete	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
may	O
reply	O
to	O
a	O
client	O
request	O
message	O
with	O
many	O
kinds	O
of	O
error	O
messages	O
,	O
anyway	O
these	O
errors	O
are	O
divided	O
mainly	O
in	O
two	O
categories	O
:	O
</s>
<s>
HTTP	B-Application
client	I-Application
errors	O
,	O
due	O
to	O
the	O
type	O
of	O
request	O
message	O
or	O
to	O
the	O
availability	O
of	O
requested	O
web	O
resource	O
;	O
</s>
<s>
HTTP	B-Application
server	I-Application
errors	O
,	O
due	O
to	O
internal	O
server	B-Application
errors	O
.	O
</s>
<s>
When	O
an	O
error	O
response	O
/	O
message	O
is	O
received	O
by	O
a	O
client	O
browser	B-Application
,	O
then	O
if	O
it	O
is	O
related	O
to	O
the	O
main	O
user	O
request	O
(	O
e.g.	O
</s>
<s>
an	O
URL	O
of	O
a	O
web	O
resource	O
such	O
as	O
a	O
web	O
page	O
)	O
then	O
usually	O
that	O
error	B-Protocol
message	I-Protocol
is	O
shown	O
in	O
some	O
browser	B-Application
window	O
/	O
message	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
may	O
be	O
able	O
to	O
verify	O
whether	O
the	O
requested	O
URL	O
path	O
:	O
</s>
<s>
If	O
the	O
authorization	O
/	O
access	O
rights	O
feature	O
has	O
been	O
implemented	O
and	O
enabled	O
and	O
access	O
to	O
web	O
resource	O
is	O
not	O
granted	O
,	O
then	O
,	O
depending	O
on	O
the	O
required	O
access	O
rights	O
,	O
a	O
web	B-Application
server	I-Application
program	B-Application
:	O
</s>
<s>
can	O
deny	O
access	O
by	O
sending	O
a	O
specific	O
error	B-Protocol
message	I-Protocol
(	O
e.g.	O
</s>
<s>
may	O
deny	O
access	O
by	O
sending	O
a	O
specific	O
error	B-Protocol
message	I-Protocol
(	O
e.g.	O
</s>
<s>
access	O
unauthorized	O
)	O
that	O
usually	O
forces	O
the	O
client	O
browser	B-Application
to	O
ask	O
human	O
user	O
to	O
provide	O
required	O
user	O
credentials	O
;	O
if	O
authentication	O
credentials	O
are	O
provided	O
then	O
web	B-Application
server	I-Application
program	B-Application
verifies	O
and	O
accepts	O
or	O
rejects	O
them	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
may	O
have	O
the	O
capability	O
of	O
doing	O
URL	O
redirections	O
to	O
new	O
URLs	O
(	O
new	O
locations	O
)	O
which	O
consists	O
in	O
replying	O
to	O
a	O
client	O
request	O
message	O
with	O
a	O
response	O
message	O
containing	O
a	O
new	O
URL	O
suited	O
to	O
access	O
a	O
valid	O
or	O
an	O
existing	O
web	O
resource	O
(	O
client	O
should	O
redo	O
the	O
request	O
with	O
the	O
new	O
URL	O
)	O
.	O
</s>
<s>
to	O
fix	O
a	O
directory	B-Application
name	O
by	O
adding	O
a	O
final	O
slash	O
'	O
/	O
'	O
;	O
</s>
<s>
Example	O
1	O
:	O
a	O
URL	O
path	O
points	O
to	O
a	O
directory	B-Application
name	O
but	O
it	O
does	O
not	O
have	O
a	O
final	O
slash	O
'	O
/	O
'	O
so	O
web	B-Application
server	I-Application
sends	O
a	O
redirect	O
to	O
client	O
in	O
order	O
to	O
instruct	O
it	O
to	O
redo	O
the	O
request	O
with	O
the	O
fixed	O
path	B-Application
name	I-Application
.	O
</s>
<s>
Example	O
2	O
:	O
a	O
whole	O
set	O
of	O
documents	O
has	O
been	O
moved	O
inside	O
website	O
in	O
order	O
to	O
reorganize	O
their	O
file	B-Application
system	I-Application
paths	O
.	O
</s>
<s>
Example	O
3	O
:	O
a	O
whole	O
set	O
of	O
documents	O
has	O
been	O
moved	O
to	O
a	O
new	O
website	O
and	O
now	O
it	O
is	O
mandatory	O
to	O
use	O
secure	O
HTTPS	B-Protocol
connections	O
to	O
access	O
them	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
program	B-Application
is	O
able	O
to	O
reply	O
to	O
a	O
valid	O
client	O
request	O
message	O
with	O
a	O
successful	O
message	O
,	O
optionally	O
containing	O
requested	O
web	O
resource	O
data	O
.	O
</s>
<s>
If	O
web	O
resource	O
data	O
is	O
sent	O
back	O
to	O
client	O
,	O
then	O
it	O
can	O
be	O
static	O
content	O
or	O
dynamic	O
content	O
depending	O
on	O
how	O
it	O
has	O
been	O
retrieved	O
(	O
from	O
a	O
file	B-Operating_System
or	O
from	O
the	O
output	O
of	O
some	O
program	B-Application
/	O
module	O
)	O
.	O
</s>
<s>
In	O
order	O
to	O
speed	O
up	O
web	B-Application
server	I-Application
responses	O
by	O
lowering	O
average	O
HTTP	B-Protocol
response	O
times	O
and	O
hardware	B-Architecture
resources	O
used	O
,	O
many	O
popular	O
web	B-Application
servers	I-Application
implement	O
one	O
or	O
more	O
content	O
caches	B-General_Concept
,	O
each	O
one	O
specialized	O
in	O
a	O
content	O
category	O
.	O
</s>
<s>
Content	O
is	O
usually	O
cached	B-Protocol
by	O
its	O
origin	O
,	O
e.g.	O
</s>
<s>
file	B-Operating_System
cache	B-Protocol
;	O
</s>
<s>
dynamic	O
cache	B-Protocol
(	O
module	O
/	O
program	B-Application
output	O
)	O
.	O
</s>
<s>
Historically	O
,	O
static	O
contents	O
found	O
in	O
files	O
which	O
had	O
to	O
be	O
accessed	O
frequently	O
,	O
randomly	O
and	O
quickly	O
,	O
have	O
been	O
stored	O
mostly	O
on	O
electro-mechanical	O
disks	B-Device
since	O
mid-late	O
1960s	O
/	O
1970s	O
;	O
regrettably	O
reads	O
from	O
and	O
writes	O
to	O
those	O
kind	O
of	O
devices	O
have	O
always	O
been	O
considered	O
very	O
slow	O
operations	O
when	O
compared	O
to	O
RAM	B-Architecture
speed	O
and	O
so	O
,	O
since	O
early	O
OSs	O
,	O
first	O
disk	B-Device
caches	B-General_Concept
and	O
then	O
also	O
OS	B-General_Concept
file	B-Operating_System
cache	B-Protocol
sub-systems	O
were	O
developed	O
to	O
speed	O
up	O
I/O	B-General_Concept
operations	I-General_Concept
of	O
frequently	O
accessed	O
data	O
/	O
files	O
.	O
</s>
<s>
Even	O
with	O
the	O
aid	O
of	O
an	O
OS	B-General_Concept
file	B-Operating_System
cache	B-Protocol
,	O
the	O
relative	O
/	O
occasional	O
slowness	O
of	O
I/O	B-General_Concept
operations	I-General_Concept
involving	O
directories	B-Application
and	O
files	O
stored	O
on	O
disks	B-Device
became	O
soon	O
a	O
bottleneck	O
in	O
the	O
increase	O
of	O
performances	O
expected	O
from	O
top	O
level	O
web	B-Application
servers	I-Application
,	O
specially	O
since	O
mid-late	O
1990s	O
,	O
when	O
web	O
Internet	O
traffic	O
started	O
to	O
grow	O
exponentially	O
along	O
with	O
the	O
constant	O
increase	O
of	O
speed	O
of	O
Internet	O
/	O
network	O
lines	O
.	O
</s>
<s>
The	O
problem	O
about	O
how	O
to	O
further	O
efficiently	O
speed-up	O
the	O
serving	O
of	O
static	O
files	O
,	O
thus	O
increasing	O
the	O
maximum	O
number	O
of	O
requests/responses	O
per	O
second	O
(	O
RPS	O
)	O
,	O
started	O
to	O
be	O
studied	O
/	O
researched	O
since	O
mid	O
1990s	O
,	O
with	O
the	O
aim	O
to	O
propose	O
useful	O
cache	B-Protocol
models	O
that	O
could	O
be	O
implemented	O
in	O
web	B-Application
server	I-Application
programs	O
.	O
</s>
<s>
In	O
practice	O
,	O
nowadays	O
,	O
many	O
popular	O
/	O
high	O
performance	O
web	B-Application
server	I-Application
programs	O
include	O
their	O
own	O
userland	O
file	B-Operating_System
cache	B-Protocol
,	O
tailored	O
for	O
a	O
web	B-Application
server	I-Application
usage	O
and	O
using	O
their	O
specific	O
implementation	O
and	O
parameters	O
.	O
</s>
<s>
The	O
wide	O
spread	O
adoption	O
of	O
RAID	B-Architecture
and/or	O
fast	O
solid-state	B-Device
drives	I-Device
(	O
storage	O
hardware	B-Architecture
with	O
very	O
high	O
I/O	B-General_Concept
speed	O
)	O
has	O
slightly	O
reduced	O
but	O
of	O
course	O
not	O
eliminated	O
the	O
advantage	O
of	O
having	O
a	O
file	B-Operating_System
cache	B-Protocol
incorporated	O
in	O
a	O
web	B-Application
server	I-Application
.	O
</s>
<s>
Dynamic	O
content	O
,	O
output	O
by	O
an	O
internal	O
module	O
or	O
an	O
external	O
program	B-Application
,	O
may	O
not	O
always	O
change	O
very	O
frequently	O
(	O
given	O
a	O
unique	O
URL	O
with	O
keys	O
/	O
parameters	O
)	O
and	O
so	O
,	O
maybe	O
for	O
a	O
while	O
(	O
e.g.	O
</s>
<s>
from	O
1	O
second	O
to	O
several	O
hours	O
or	O
more	O
)	O
,	O
the	O
resulting	O
output	O
can	O
be	O
cached	B-Protocol
in	O
RAM	B-Architecture
or	O
even	O
on	O
a	O
fast	O
disk	B-Device
.	O
</s>
<s>
The	O
typical	O
usage	O
of	O
a	O
dynamic	O
cache	B-Protocol
is	O
when	O
a	O
website	O
has	O
dynamic	O
web	O
pages	O
about	O
news	O
,	O
weather	O
,	O
images	O
,	O
maps	O
,	O
etc	O
.	O
</s>
<s>
every	O
n	O
minutes	O
)	O
and	O
that	O
are	O
accessed	O
by	O
a	O
huge	O
number	O
of	O
clients	O
per	O
minute	O
/	O
hour	O
;	O
in	O
those	O
cases	O
it	O
is	O
useful	O
to	O
return	O
cached	B-Protocol
content	O
too	O
(	O
without	O
calling	O
the	O
internal	O
module	O
or	O
the	O
external	O
program	B-Application
)	O
because	O
clients	O
often	O
do	O
not	O
have	O
an	O
updated	O
copy	O
of	O
the	O
requested	O
content	O
in	O
their	O
browser	B-Protocol
caches	I-Protocol
.	O
</s>
<s>
Anyway	O
,	O
in	O
most	O
cases	O
those	O
kind	O
of	O
caches	B-General_Concept
are	O
implemented	O
by	O
external	O
servers	O
(	O
e.g.	O
</s>
<s>
reverse	B-General_Concept
proxy	I-General_Concept
)	O
or	O
by	O
storing	O
dynamic	O
data	O
output	O
in	O
separate	O
computers	O
,	O
managed	O
by	O
specific	O
applications	O
(	O
e.g.	O
</s>
<s>
memcached	B-Application
)	O
,	O
in	O
order	O
to	O
not	O
compete	O
for	O
hardware	B-Architecture
resources	O
(	O
CPU	B-General_Concept
,	O
RAM	B-Architecture
,	O
disks	B-Device
)	O
with	O
web	O
server(s )	O
.	O
</s>
<s>
A	O
web	B-Application
server	I-Application
software	B-Application
can	O
be	O
either	O
incorporated	O
into	O
the	O
OS	B-General_Concept
and	O
executed	O
in	O
kernel	B-Operating_System
space	I-Operating_System
,	O
or	O
it	O
can	O
be	O
executed	O
in	O
user	B-Operating_System
space	I-Operating_System
(	O
like	O
other	O
regular	O
applications	O
)	O
.	O
</s>
<s>
Web	B-Application
servers	I-Application
that	O
run	O
in	O
kernel	B-Operating_System
mode	O
(	O
usually	O
called	O
kernel	B-Protocol
space	I-Protocol
web	I-Protocol
servers	I-Protocol
)	O
can	O
have	O
direct	O
access	O
to	O
kernel	B-Operating_System
resources	O
and	O
so	O
they	O
can	O
be	O
,	O
in	O
theory	O
,	O
faster	O
than	O
those	O
running	O
in	O
user	B-Operating_System
mode	I-Operating_System
;	O
anyway	O
there	O
are	O
disadvantages	O
in	O
running	O
a	O
web	B-Application
server	I-Application
in	O
kernel	B-Operating_System
mode	O
,	O
e.g.	O
</s>
<s>
:	O
difficulties	O
in	O
developing	O
(	O
debugging	O
)	O
software	B-Application
whereas	O
run-time	B-Library
critical	B-Error_Name
errors	I-Error_Name
may	O
lead	O
to	O
serious	O
problems	O
in	O
OS	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
Web	B-Application
servers	I-Application
that	O
run	O
in	O
user-mode	B-Operating_System
have	O
to	O
ask	O
the	O
system	O
for	O
permission	O
to	O
use	O
more	O
memory	O
or	O
more	O
CPU	B-General_Concept
resources	O
.	O
</s>
<s>
Not	O
only	O
do	O
these	O
requests	O
to	O
the	O
kernel	B-Operating_System
take	O
time	O
,	O
but	O
they	O
might	O
not	O
always	O
be	O
satisfied	O
because	O
the	O
system	O
reserves	O
resources	O
for	O
its	O
own	O
usage	O
and	O
has	O
the	O
responsibility	O
to	O
share	O
hardware	B-Architecture
resources	O
with	O
all	O
the	O
other	O
running	O
applications	O
.	O
</s>
<s>
Executing	O
in	O
user	B-Operating_System
mode	I-Operating_System
can	O
also	O
mean	O
using	O
more	O
buffer/data	O
copies	O
(	O
between	O
user-space	B-Operating_System
and	O
kernel-space	B-Operating_System
)	O
which	O
can	O
lead	O
to	O
a	O
decrease	O
in	O
the	O
performance	O
of	O
a	O
user-mode	B-Operating_System
web	B-Application
server	I-Application
.	O
</s>
<s>
Nowadays	O
almost	O
all	O
web	B-Application
server	I-Application
software	B-Application
is	O
executed	O
in	O
user	B-Operating_System
mode	I-Operating_System
(	O
because	O
many	O
of	O
the	O
aforementioned	O
small	O
disadvantages	O
have	O
been	O
overcome	O
by	O
faster	O
hardware	B-Architecture
,	O
new	O
OS	B-General_Concept
versions	O
,	O
much	O
faster	O
OS	B-General_Concept
system	B-Operating_System
calls	I-Operating_System
and	O
new	O
optimized	O
web	B-Application
server	I-Application
software	B-Application
)	O
.	O
</s>
<s>
See	O
also	O
comparison	B-Protocol
of	I-Protocol
web	I-Protocol
server	I-Protocol
software	I-Protocol
to	O
discover	O
which	O
of	O
them	O
run	O
in	O
kernel	B-Operating_System
mode	O
or	O
in	O
user	B-Operating_System
mode	I-Operating_System
(	O
also	O
referred	O
as	O
kernel	B-Operating_System
space	I-Operating_System
or	O
user	B-Operating_System
space	I-Operating_System
)	O
.	O
</s>
<s>
To	O
improve	O
the	O
user	B-Application
experience	I-Application
(	O
on	O
client	O
/	O
browser	B-Application
side	O
)	O
,	O
a	O
web	B-Application
server	I-Application
should	O
reply	O
quickly	O
(	O
as	O
soon	O
as	O
possible	O
)	O
to	O
client	O
requests	O
;	O
unless	O
content	O
response	O
is	O
throttled	O
(	O
by	O
configuration	O
)	O
for	O
some	O
type	O
of	O
files	O
(	O
e.g.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
web	B-Application
server	I-Application
should	O
always	O
be	O
very	O
responsive	B-Application
,	O
even	O
under	O
high	O
load	O
of	O
web	O
traffic	O
,	O
in	O
order	O
to	O
keep	O
total	O
user	O
's	O
wait	O
(	O
sum	O
of	O
browser	B-Application
time	O
+	O
network	O
time	O
+	O
web	B-Application
server	I-Application
response	O
time	O
)	O
for	O
a	O
response	O
as	O
low	O
as	O
possible	O
.	O
</s>
<s>
For	O
web	B-Application
server	I-Application
software	B-Application
,	O
main	O
key	O
performance	O
metrics	O
(	O
measured	O
under	O
vary	O
operating	O
conditions	O
)	O
usually	O
are	O
at	O
least	O
the	O
following	O
ones	O
(	O
i.e.	O
</s>
<s>
(	O
,	O
similar	O
to	O
,	O
depending	O
on	O
HTTP	B-Protocol
version	O
and	O
configuration	O
,	O
type	O
of	O
HTTP	B-Protocol
requests	I-Protocol
and	O
other	O
operating	O
conditions	O
)	O
;	O
</s>
<s>
(	O
)	O
,	O
is	O
the	O
number	O
of	O
connections	O
per	O
second	O
accepted	O
by	O
web	B-Application
server	I-Application
(	O
useful	O
when	O
using	O
HTTP/1.0	B-Protocol
or	O
HTTP/1.1	B-Protocol
with	O
a	O
very	O
low	O
limit	O
of	O
requests	O
/	O
responses	O
per	O
connection	O
,	O
i.e.	O
</s>
<s>
1	O
..	B-Application
20	O
)	O
;	O
</s>
<s>
Among	O
the	O
operating	O
conditions	O
,	O
the	O
(	O
1	O
..	B-Application
n	O
)	O
of	O
used	O
during	O
a	O
test	O
is	O
an	O
important	O
parameter	O
because	O
it	O
allows	O
to	O
correlate	O
the	O
supported	O
by	O
web	B-Application
server	I-Application
with	O
results	O
of	O
the	O
tested	O
performance	O
metrics	O
.	O
</s>
<s>
The	O
specific	O
web	B-Application
server	I-Application
software	B-Application
design	O
and	O
model	O
adopted	O
(	O
e.g.	O
</s>
<s>
single	O
process	B-Operating_System
or	O
multi-process	O
;	O
</s>
<s>
single	B-Operating_System
thread	I-Operating_System
(	O
no	O
thread	B-Operating_System
)	O
or	O
multi-thread	O
for	O
each	O
process	B-Operating_System
;	O
</s>
<s>
usage	O
of	O
coroutines	B-Architecture
or	O
not	O
;	O
</s>
<s>
...	O
and	O
other	O
programming	O
techniques	O
,	O
such	O
as	O
(	O
e.g.	O
</s>
<s>
minimization	O
of	O
possible	O
CPU	B-General_Concept
cache	B-Protocol
misses	O
;	O
</s>
<s>
minimization	O
of	O
possible	O
CPU	B-General_Concept
branch	I-General_Concept
mispredictions	I-General_Concept
in	O
critical	O
paths	O
for	O
speed	O
;	O
</s>
<s>
minimization	O
of	O
the	O
number	O
of	O
system	B-Operating_System
calls	I-Operating_System
used	O
to	O
perform	O
a	O
certain	O
function	O
/	O
task	O
;	O
</s>
<s>
...	O
used	O
to	O
implement	O
a	O
web	B-Application
server	I-Application
program	B-Application
,	O
can	O
bias	O
a	O
lot	O
the	O
performances	O
and	O
in	O
particular	O
the	O
scalability	B-Architecture
level	O
that	O
can	O
be	O
achieved	O
under	O
heavy	O
load	O
or	O
when	O
using	O
high	O
end	O
hardware	B-Architecture
(	O
many	O
CPUs	O
,	O
disks	B-Device
and	O
lots	O
of	O
RAM	B-Architecture
)	O
.	O
</s>
<s>
In	O
practice	O
some	O
web	B-Application
server	I-Application
software	B-Application
models	O
may	O
require	O
more	O
OS	B-General_Concept
resources	O
(	O
specially	O
more	O
CPUs	O
and	O
more	O
RAM	B-Architecture
)	O
than	O
others	O
to	O
be	O
able	O
to	O
work	O
well	O
and	O
so	O
to	O
achieve	O
target	O
performances	O
.	O
</s>
<s>
There	O
are	O
many	O
operating	O
conditions	O
that	O
can	O
affect	O
the	O
performances	O
of	O
a	O
web	B-Application
server	I-Application
;	O
performance	O
values	O
may	O
vary	O
depending	O
on	O
(	O
i.e.	O
</s>
<s>
the	O
settings	O
of	O
web	B-Application
server	I-Application
(	O
including	O
the	O
fact	O
that	O
log	B-Application
file	I-Application
is	O
or	O
is	O
not	O
enabled	O
,	O
etc	O
.	O
</s>
<s>
the	O
HTTP	B-Protocol
version	O
used	O
by	O
client	O
requests	O
;	O
</s>
<s>
the	O
average	O
HTTP	B-Protocol
request	O
type	O
(	O
method	O
,	O
length	O
of	O
HTTP	B-Protocol
headers	I-Protocol
and	O
optional	O
body	O
)	O
;	O
</s>
<s>
whether	O
the	O
content	O
is	O
cached	B-Protocol
or	O
not	O
cached	B-Protocol
(	O
by	O
server	B-Application
and/or	O
by	O
client	O
)	O
;	O
</s>
<s>
whether	O
the	O
content	O
is	O
compressed	B-Protocol
on	O
the	O
fly	O
(	O
when	O
transferred	O
)	O
,	O
pre-compressed	O
(	O
i.e.	O
</s>
<s>
when	O
a	O
file	B-Operating_System
resource	O
is	O
stored	O
on	O
disk	B-Device
already	O
compressed	B-Protocol
so	O
that	O
web	B-Application
server	I-Application
can	O
send	O
that	O
file	B-Operating_System
directly	O
to	O
the	O
network	O
with	O
the	O
only	O
indication	O
that	O
its	O
content	O
is	O
compressed	B-Protocol
)	O
or	O
not	O
compressed	B-Protocol
at	O
all	O
;	O
</s>
<s>
the	O
average	O
network	O
speed	O
between	O
web	B-Application
server	I-Application
and	O
its	O
clients	O
;	O
</s>
<s>
the	O
number	O
of	O
active	O
TCP	B-Protocol
connections	O
;	O
</s>
<s>
the	O
number	O
of	O
active	O
processes	O
managed	O
by	O
web	B-Application
server	I-Application
(	O
including	O
external	O
CGI	B-Language
,	O
SCGI	B-Protocol
,	O
FCGI	O
programs	O
)	O
;	O
</s>
<s>
the	O
hardware	B-Architecture
and	O
software	B-Application
limitations	O
or	O
settings	O
of	O
the	O
OS	B-General_Concept
of	O
the	O
computer(s )	O
on	O
which	O
the	O
web	B-Application
server	I-Application
runs	O
;	O
</s>
<s>
A	O
web	B-Application
server	I-Application
(	O
program	B-Application
installation	O
)	O
usually	O
has	O
pre-defined	O
load	O
limits	O
for	O
each	O
combination	O
of	O
operating	O
conditions	O
,	O
also	O
because	O
it	O
is	O
limited	O
by	O
OS	B-General_Concept
resources	O
and	O
because	O
it	O
can	O
handle	O
only	O
a	O
limited	O
number	O
of	O
concurrent	O
client	O
connections	O
(	O
usually	O
between	O
2	O
and	O
several	O
tens	O
of	O
thousands	O
for	O
each	O
active	O
web	B-Application
server	I-Application
process	B-Operating_System
,	O
see	O
also	O
the	O
C10k	B-Protocol
problem	I-Protocol
and	O
the	O
C10M	O
problem	O
)	O
.	O
</s>
<s>
When	O
a	O
web	B-Application
server	I-Application
is	O
near	O
to	O
or	O
over	O
its	O
load	O
limits	O
,	O
it	O
gets	O
overloaded	O
and	O
so	O
it	O
may	O
become	O
unresponsive	O
.	O
</s>
<s>
At	O
any	O
time	O
web	B-Application
servers	I-Application
can	O
be	O
overloaded	O
due	O
to	O
one	O
or	O
more	O
of	O
the	O
following	O
causes	O
(	O
e.g.	O
</s>
<s>
Thousands	O
or	O
even	O
millions	O
of	O
clients	O
connecting	O
to	O
the	O
website	O
in	O
a	O
short	O
amount	O
of	O
time	O
,	O
e.g.	O
,	O
Slashdot	B-General_Concept
effect	I-General_Concept
.	O
</s>
<s>
XSS	O
worms	O
can	O
cause	O
high	O
traffic	O
because	O
of	O
millions	O
of	O
infected	O
browsers	B-Application
or	O
web	B-Application
servers	I-Application
.	O
</s>
<s>
Internet	B-Protocol
bots	I-Protocol
Traffic	O
not	O
filtered/limited	O
on	O
large	O
websites	O
with	O
very	O
few	O
network	O
resources	O
(	O
e.g.	O
</s>
<s>
bandwidth	O
)	O
and/or	O
hardware	B-Architecture
resources	O
(	O
CPUs	O
,	O
RAM	B-Architecture
,	O
disks	B-Device
)	O
.	O
</s>
<s>
due	O
to	O
packet	O
losses	O
)	O
so	O
that	O
client	O
requests	O
are	O
served	O
more	O
slowly	O
and	O
the	O
number	O
of	O
connections	O
increases	O
so	O
much	O
that	O
server	B-Application
limits	O
are	O
reached	O
.	O
</s>
<s>
Web	B-Application
servers	I-Application
,	O
serving	O
dynamic	O
content	O
,	O
waiting	O
for	O
slow	O
responses	O
coming	O
from	O
back-end	B-Architecture
computer(s )	O
(	O
e.g.	O
</s>
<s>
databases	O
)	O
,	O
maybe	O
because	O
of	O
too	O
many	O
queries	O
mixed	O
with	O
too	O
many	O
inserts	O
or	O
updates	O
of	O
DB	O
data	O
;	O
in	O
these	O
cases	O
web	B-Application
servers	I-Application
have	O
to	O
wait	O
for	O
back-end	B-Architecture
data	O
responses	O
before	O
replying	O
to	O
HTTP	B-Application
clients	I-Application
but	O
during	O
these	O
waits	O
too	O
many	O
new	O
client	O
connections	O
/	O
requests	O
arrive	O
and	O
so	O
they	O
become	O
overloaded	O
.	O
</s>
<s>
Web	B-Application
servers	I-Application
(	O
computers	O
)	O
partial	O
unavailability	O
.	O
</s>
<s>
This	O
can	O
happen	O
because	O
of	O
required	O
or	O
urgent	O
maintenance	O
or	O
upgrade	O
,	O
hardware	B-Architecture
or	O
software	B-Error_Name
failures	I-Error_Name
such	O
as	O
back-end	B-Architecture
(	O
e.g.	O
</s>
<s>
database	O
)	O
failures	O
;	O
in	O
these	O
cases	O
the	O
remaining	O
web	B-Application
servers	I-Application
may	O
get	O
too	O
much	O
traffic	O
and	O
become	O
overloaded	O
.	O
</s>
<s>
The	O
symptoms	O
of	O
an	O
overloaded	O
web	B-Application
server	I-Application
are	O
usually	O
the	O
following	O
ones	O
(	O
e.g.	O
</s>
<s>
The	O
web	B-Application
server	I-Application
returns	O
an	O
HTTP	B-Protocol
error	I-Protocol
code	I-Protocol
,	O
such	O
as	O
500	O
,	O
502	O
,	O
503	O
,	O
504	O
,	O
408	O
,	O
or	O
even	O
an	O
intermittent	O
404	B-Protocol
.	O
</s>
<s>
The	O
web	B-Application
server	I-Application
refuses	O
or	O
resets	O
(	O
interrupts	O
)	O
TCP	B-Protocol
connections	O
before	O
it	O
returns	O
any	O
content	O
.	O
</s>
<s>
In	O
very	O
rare	O
cases	O
,	O
the	O
web	B-Application
server	I-Application
returns	O
only	O
a	O
part	O
of	O
the	O
requested	O
content	O
.	O
</s>
<s>
This	O
behavior	O
can	O
be	O
considered	O
a	O
bug	B-Error_Name
,	O
even	O
if	O
it	O
usually	O
arises	O
as	O
a	O
symptom	O
of	O
overload	O
.	O
</s>
<s>
Tuning	O
OS	B-General_Concept
parameters	O
for	O
hardware	B-Architecture
capabilities	O
and	O
usage	O
.	O
</s>
<s>
Firewalls	B-Application
to	O
block	O
unwanted	O
traffic	O
coming	O
from	O
bad	O
IP	O
sources	O
or	O
having	O
bad	O
patterns	O
;	O
</s>
<s>
HTTP	B-Protocol
traffic	O
managers	O
to	O
drop	O
,	O
redirect	O
or	O
rewrite	O
requests	O
having	O
bad	O
HTTP	B-Protocol
patterns	O
;	O
</s>
<s>
Using	O
different	O
domain	O
names	O
,	O
IP	B-Protocol
addresses	I-Protocol
and	O
computers	O
to	O
serve	O
different	O
kinds	O
(	O
static	O
and	O
dynamic	O
)	O
of	O
content	O
;	O
the	O
aim	O
is	O
to	O
separate	O
big	O
or	O
huge	O
files	O
(	O
download	O
.	O
</s>
<s>
*	O
)	O
(	O
that	O
domain	O
might	O
be	O
replaced	O
also	O
by	O
a	O
CDN	B-Operating_System
)	O
from	O
small	O
and	O
medium-sized	O
files	O
(	O
static	O
.	O
</s>
<s>
*	O
)	O
and	O
from	O
main	O
dynamic	O
site	O
(	O
maybe	O
where	O
some	O
contents	O
are	O
stored	O
in	O
a	O
backend	B-Architecture
database	O
)	O
(	O
www	O
.	O
</s>
<s>
*	O
)	O
;	O
the	O
idea	O
is	O
to	O
be	O
able	O
to	O
efficiently	O
serve	O
big	O
or	O
huge	O
(	O
over	O
10	O
–	O
1000	O
MB	O
)	O
files	O
(	O
maybe	O
throttling	O
downloads	O
)	O
and	O
to	O
fully	O
cache	B-Protocol
small	O
and	O
medium-sized	O
files	O
,	O
without	O
affecting	O
performances	O
of	O
dynamic	O
site	O
under	O
heavy	O
load	O
,	O
by	O
using	O
different	O
settings	O
for	O
each	O
(	O
group	O
)	O
of	O
web	B-Application
server	I-Application
computers	O
,	O
e.g.	O
</s>
<s>
Using	O
many	O
web	B-Application
servers	I-Application
(	O
computers	O
)	O
that	O
are	O
grouped	O
together	O
behind	O
a	O
load	B-Application
balancer	I-Application
so	O
that	O
they	O
act	O
or	O
are	O
seen	O
as	O
one	O
big	O
web	B-Application
server	I-Application
.	O
</s>
<s>
Adding	O
more	O
hardware	B-Architecture
resources	O
(	O
i.e.	O
</s>
<s>
RAM	B-Architecture
,	O
fast	O
disks	B-Device
)	O
to	O
each	O
computer	O
.	O
</s>
<s>
Using	O
more	O
efficient	O
computer	B-Application
programs	I-Application
for	O
web	B-Application
servers	I-Application
(	O
see	O
also	O
:	O
software	B-Application
efficiency	O
)	O
.	O
</s>
<s>
Using	O
the	O
most	O
efficient	O
to	O
process	B-Operating_System
dynamic	O
requests	O
(	O
spawning	O
one	O
or	O
more	O
external	O
programs	O
every	O
time	O
a	O
dynamic	O
page	O
is	O
retrieved	O
,	O
kills	O
performances	O
)	O
.	O
</s>
<s>
Using	O
other	O
programming	O
techniques	O
and	O
workarounds	B-Application
,	O
especially	O
if	O
dynamic	O
content	O
is	O
involved	O
,	O
to	O
speed	O
up	O
the	O
HTTP	B-Protocol
responses	O
(	O
i.e.	O
</s>
<s>
Using	O
latest	O
efficient	O
versions	O
of	O
HTTP	B-Protocol
(	O
e.g.	O
</s>
<s>
beyond	O
using	O
common	O
HTTP/1.1	B-Protocol
also	O
by	O
enabling	O
HTTP/2	B-Protocol
and	O
maybe	O
HTTP/3	B-Protocol
too	O
,	O
whenever	O
available	O
web	B-Application
server	I-Application
software	B-Application
has	O
reliable	O
support	O
for	O
the	O
latter	O
two	O
protocols	O
)	O
in	O
order	O
to	O
reduce	O
a	O
lot	O
the	O
number	O
of	O
TCP/IP	O
connections	O
started	O
by	O
each	O
client	O
and	O
the	O
size	O
of	O
data	O
exchanged	O
(	O
because	O
of	O
more	O
compact	O
HTTP	B-Protocol
headers	I-Protocol
representation	O
and	O
maybe	O
data	O
compression	O
)	O
.	O
</s>
<s>
Below	O
are	O
the	O
latest	O
statistics	O
of	O
the	O
market	O
share	O
of	O
all	O
sites	O
of	O
the	O
top	O
web	B-Application
servers	I-Application
on	O
the	O
Internet	O
by	O
Netcraft	O
.	O
</s>
