<s>
WEBrick	B-Application
is	O
a	O
Ruby	B-Language
library	O
providing	O
simple	O
HTTP	B-Application
web	I-Application
servers	I-Application
.	O
</s>
<s>
It	O
uses	O
basic	B-Protocol
access	I-Protocol
authentication	I-Protocol
and	O
digest	B-Protocol
access	I-Protocol
authentication	I-Protocol
for	O
different	O
kinds	O
of	O
servers	O
that	O
it	O
can	O
create	O
-	O
HTTP	B-Protocol
based	O
server	B-Application
,	O
HTTPS	B-Protocol
server	B-Application
,	O
proxy	B-Application
server	I-Application
and	O
virtual-host	O
server	B-Application
.	O
</s>
<s>
Construction	O
of	O
several	O
non-HTTP	O
servers	O
such	O
as	O
the	O
Day	O
Time	O
Server	B-Application
which	O
uses	O
the	O
Daytime	B-Protocol
Protocol	I-Protocol
rather	O
than	O
the	O
HTTP	B-Protocol
is	O
also	O
facilitated	O
by	O
WEBrick	B-Application
.	O
</s>
<s>
It	O
is	O
used	O
by	O
the	O
Ruby	B-Application
on	I-Application
Rails	I-Application
and	O
Padrino	B-Application
frameworks	O
to	O
test	O
applications	O
in	O
a	O
development	O
environment	O
as	O
well	O
as	O
production	O
mode	O
for	O
small	O
loads	O
.	O
</s>
<s>
It	O
is	O
now	O
a	O
part	O
of	O
Ruby	B-Language
standard	O
library	O
.	O
</s>
<s>
WEBrick	B-Application
follows	O
open-source	B-License
distribution	I-License
model	I-License
.	O
</s>
<s>
WEBrick	B-Application
has	O
originated	O
from	O
an	O
idea	O
in	O
an	O
article	O
named	O
"	O
Internet	O
Programming	O
with	O
Ruby	B-Language
"	O
in	O
Open	O
Design	O
,	O
a	O
Japanese	O
Engineering	O
magazine	O
.	O
</s>
<s>
It	O
was	O
initially	O
developed	O
as	O
a	O
toolkit	O
for	O
the	O
development	O
of	O
HTTP	B-Application
servers	I-Application
using	O
Ruby	B-Language
.	O
</s>
<s>
Due	O
to	O
the	O
nature	O
of	O
open	B-Application
source	I-Application
model	I-Application
and	O
contributions	O
from	O
several	O
Ruby	B-Language
developers	O
across	O
the	O
world	O
,	O
WEBrick	B-Application
was	O
greatly	O
augmented	O
and	O
was	O
eventually	O
bundled	O
as	O
a	O
standard	O
library	O
from	O
Ruby	B-Language
1.8.0	O
.	O
</s>
<s>
The	O
WEBrick	B-Application
ERB	O
Handler	O
and	O
WEBrick	B-Application
Proxy	B-Application
Server	I-Application
were	O
first	O
introduced	O
in	O
Ruby	B-Language
1.9.3	O
,	O
while	O
the	O
WEBrick	B-Application
Virtual	O
Host	O
was	O
included	O
from	O
Ruby	B-Language
2.0.0	O
.	O
</s>
<s>
A	O
WEBrick	B-Application
server	B-Application
understands	O
only	O
the	O
language	O
of	O
.	O
</s>
<s>
It	O
uses	O
multiple	O
independent	O
servlets	O
,	O
joined	O
together	O
by	O
the	O
programmer	O
,	O
for	O
handling	O
CGI	B-Language
scripts	I-Language
,	O
ERB	B-Application
pages	I-Application
,	O
Ruby	B-Language
Blocks	O
and	O
directory	O
listings	O
to	O
provide	O
a	O
web	O
application	O
or	O
to	O
service	O
a	O
request	O
URI	B-Protocol
on	O
a	O
per-host	O
or	O
per-path	O
basis	O
.	O
</s>
<s>
For	O
example	O
,	O
,	O
,	O
,	O
are	O
the	O
examples	O
of	O
the	O
standard	O
servlets	O
that	O
WEBrick	B-Application
comes	O
with	O
.	O
</s>
<s>
WEBrick	B-Application
is	O
included	O
in	O
Ruby	B-Language
and	O
hence	O
is	O
available	O
to	O
the	O
user	O
at	O
no	O
additional	O
cost	O
.	O
</s>
<s>
WEBrick	B-Application
has	O
been	O
written	O
completely	O
in	O
Ruby	B-Language
and	O
supports	O
several	O
standards	O
such	O
as	O
HTTP	B-Protocol
,	O
HTML	B-Language
and	O
even	O
RHTML	B-Application
.	O
</s>
<s>
During	O
the	O
development	O
stage	O
,	O
there	O
is	O
no	O
necessity	O
for	O
the	O
installation	O
of	O
a	O
discrete	O
web	B-Application
server	I-Application
since	O
WEBrick	B-Application
is	O
already	O
built	O
into	O
the	O
Rails	B-Application
framework	I-Application
.	O
</s>
<s>
It	O
is	O
the	O
default	O
web	B-Application
server	I-Application
when	O
the	O
Ruby	B-Language
application	O
is	O
deployed	O
without	O
any	O
on	O
Rails	B-Application
.	O
</s>
<s>
Furthermore	O
,	O
since	O
being	O
implemented	O
entirely	O
in	O
Ruby	B-Language
,	O
direct	O
calls	O
can	O
be	O
made	O
from	O
WEBrick	B-Application
to	O
the	O
Rails	B-Application
application	O
.	O
</s>
<s>
The	O
following	O
commands	O
are	O
used	O
to	O
start	O
an	O
HTTP	B-Application
Server	I-Application
at	O
the	O
required	O
port	O
.	O
</s>
<s>
Servlets	O
can	O
be	O
mounted	O
to	O
provide	O
advanced	O
custom	O
behavior	O
as	O
compared	O
to	O
a	O
proc	O
,	O
to	O
increase	O
the	O
modularity	B-Architecture
.	O
</s>
<s>
WEBrick	B-Application
creates	O
a	O
listening	O
port	O
.	O
</s>
<s>
:D	O
ocumentRoot	O
should	O
be	O
provided	O
or	O
an	O
instance	O
of	O
a	O
servlet	O
should	O
be	O
set	O
up	O
to	O
service	O
a	O
request	O
URI	B-Protocol
;	O
otherwise	O
a	O
404	B-Protocol
error	I-Protocol
will	O
be	O
returned	O
.	O
</s>
<s>
By	O
just	O
enabling	O
SSL	B-Protocol
and	O
providing	O
an	O
SSL	B-Protocol
certificate	O
name	O
,	O
an	O
HTTPS	B-Protocol
server	B-Application
can	O
be	O
initiated	O
with	O
a	O
self-signed	B-Protocol
certificate	I-Protocol
that	O
changes	O
with	O
every	O
restart	O
of	O
the	O
server	B-Application
.	O
</s>
<s>
However	O
,	O
a	O
pre-determined	O
key	O
and	O
certificate	O
can	O
also	O
be	O
provided	O
for	O
instantiating	O
HTTPS	B-Protocol
Server	B-Application
as	O
shown	O
below	O
:	O
</s>
<s>
WEBrick	B-Application
can	O
also	O
proxy	O
GET	O
,	O
HEAD	O
and	O
POST	O
requests	B-Protocol
:	O
</s>
<s>
Unlike	O
most	O
of	O
the	O
servers	O
that	O
are	O
used	O
in	O
production	O
,	O
WEBrick	B-Application
is	O
not	O
scalable	O
since	O
it	O
is	O
a	O
single	B-Operating_System
threaded	I-Operating_System
web	B-Application
server	I-Application
by	O
default	O
.	O
</s>
<s>
Hence	O
,	O
multiple	O
requests	B-Protocol
at	O
the	O
same	O
time	O
cannot	O
be	O
handled	O
and	O
the	O
subsequent	O
requests	B-Protocol
would	O
have	O
to	O
wait	O
till	O
all	O
the	O
previous	O
requests	B-Protocol
have	O
been	O
handled	O
,	O
incurring	O
a	O
large	O
delay	O
.	O
</s>
<s>
Hence	O
,	O
developers	O
prefer	O
other	O
multi-threaded	B-Operating_System
full-fledged	O
web	B-Application
servers	I-Application
like	O
Lighttpd	B-Protocol
and	O
Mongrel	B-Application
for	O
deploying	O
their	O
Rails	B-Application
applications	O
.	O
</s>
