You are on page 1of 5

1/26/2017 WebserverWikipedia

Webserver
FromWikipedia,thefreeencyclopedia

AwebserverisacomputersystemthatprocessesrequestsviaHTTP,the
basicnetworkprotocolusedtodistributeinformationontheWorldWide
Web.Thetermcanrefertotheentiresystem,orspecificallytothesoftware
thatacceptsandsupervisestheHTTPrequests.[1]

Contents
1 Overview TheinsideandfrontofaDell
2 History PowerEdgewebserver,acomputer
3 Pathtranslation designedforrackmounting
4 Kernelmodeandusermodewebservers
5 Loadlimits
5.1 Causesofoverload
5.2 Symptomsofoverload
5.3 Antioverloadtechniques
6 Marketshare
7 Seealso
8 References
9 Externallinks

Overview
Theprimaryfunctionofawebserveristostore,processanddeliverwebpagestoclients.Thecommunication
betweenclientandservertakesplaceusingtheHypertextTransferProtocol(HTTP).Pagesdeliveredaremost
frequentlyHTMLdocuments,whichmayincludeimages,stylesheetsandscriptsinadditiontotextcontent.

Auseragent,commonlyawebbrowserorwebcrawler,initiates
communicationbymakingarequestforaspecificresourceusingHTTP
andtheserverrespondswiththecontentofthatresourceoranerror
messageifunabletodoso.Theresourceistypicallyarealfileonthe
server'ssecondarystorage,butthisisnotnecessarilythecaseanddepends
onhowthewebserverisimplemented.

Whiletheprimaryfunctionistoservecontent,afullimplementationof
HTTPalsoincludeswaysofreceivingcontentfromclients.Thisfeatureis
usedforsubmittingwebforms,includinguploadingoffiles.

ManygenericwebserversalsosupportserversidescriptingusingActive
ServerPages(ASP),PHP,orotherscriptinglanguages.Thismeansthatthe
behaviourofthewebservercanbescriptedinseparatefiles,whilethe Workingprocessofwebservers
actualserversoftwareremainsunchanged.Usually,thisfunctionisusedto
generateHTMLdocumentsdynamically("onthefly")asopposedtoreturningstaticdocuments.Theformeris
primarilyusedforretrievingand/ormodifyinginformationfromdatabases.Thelatteristypicallymuchfasterand
moreeasilycachedbutcannotdeliverdynamiccontent.

https://en.wikipedia.org/wiki/Web_server 1/5
1/26/2017 WebserverWikipedia

WebserversarenotonlyusedforservingtheWorldWideWeb.
Theycanalsobefoundembeddedindevicessuchasprinters,
routers,webcamsandservingonlyalocalnetwork.Theweb
servermaythenbeusedasapartofasystemformonitoringor
administeringthedeviceinquestion.Thisusuallymeansthatno
additionalsoftwarehastobeinstalledontheclientcomputer,since
onlyawebbrowserisrequired(whichnowisincludedwithmost
operatingsystems).

History
Multiplewebserversmaybeusedforahigh
In1989TimBernersLeeproposedanewprojecttohisemployer trafficwebsite,hereDellserversareinstalled
CERN,withthegoalofeasingtheexchangeofinformation togetherbeingusedfortheWikimedia
betweenscientistsbyusingahypertextsystem.Theproject Foundation
resultedinBernersLeewritingtwoprogramsin1990:

AbrowsercalledWorldWideWeb.
Theworld'sfirstwebserver,laterknownasCERNhttpd,whichran
onNeXTSTEP

Between1991and1994,thesimplicityandeffectivenessofearly
technologiesusedtosurfandexchangedatathroughtheWorldWideWeb
helpedtoportthemtomanydifferentoperatingsystemsandspreadtheir
useamongscientificorganizationsanduniversities,andsubsequentlyto
industry.
Theworld'sfirstwebserver,aNeXT
In1994BernersLeedecidedtoconstitutetheWorldWideWeb ComputerworkstationwithEthernet,
Consortium(W3C)toregulatethefurtherdevelopmentofthemany 1990.Thecaselabelreads:"This
technologiesinvolved(HTTP,HTML,etc.)throughastandardization machineisaserver.DONOT
process. POWERITDOWN!!"

Pathtranslation
WebserversareabletomapthepathcomponentofaUniformResource
Locator(URL)into:

Alocalfilesystemresource(forstaticrequests)
Aninternalorexternalprogramname(fordynamicrequests)

ForastaticrequesttheURLpathspecifiedbytheclientisrelativetothe
webserver'srootdirectory.
Sun'sCobaltQube3acomputer
ConsiderthefollowingURLasitwouldberequestedbyaclient: serverappliance(2002,discontinued)

http://www.example.com/path/file.html

Theclient'suseragentwilltranslateitintoaconnectiontowww.example.comwiththefollowingHTTP1.1request:

GET/path/file.htmlHTTP/1.1
Host:www.example.com

https://en.wikipedia.org/wiki/Web_server 2/5
1/26/2017 WebserverWikipedia

Thewebserveronwww.example.comwillappendthegivenpathtothepathofitsrootdirectory.OnanApache
server,thisiscommonly/home/www(OnUnixmachines,usually/var/www).Theresultisthelocalfilesystem
resource:

/home/www/path/file.html

Thewebserverthenreadsthefile,ifitexists,andsendsaresponsetotheclient'swebbrowser.Theresponsewill
describethecontentofthefileandcontainthefileitselforanerrormessagewillreturnsayingthatthefiledoesnot
existorisunavailable.

Kernelmodeandusermodewebservers
AwebservercanbeeitherincorporatedintotheOSkernel,orinuserspace(likeotherregularapplications).

WebserversthatruninusermodehavetoaskthesystemforpermissiontousemorememoryormoreCPU
resources.Notonlydotheserequeststothekerneltaketime,buttheyarenotalwayssatisfiedbecausethesystem
reservesresourcesforitsownusageandhastheresponsibilitytosharehardwareresourceswithalltheother
runningapplications.Executinginusermodecanalsomeanuselessbuffercopieswhichareanotherhandicapfor
usermodewebservers.

Loadlimits
Awebserver(program)hasdefinedloadlimits,becauseitcanhandleonlyalimitednumberofconcurrentclient
connections(usuallybetween2and80,000,bydefaultbetween500and1,000)perIPaddress(andTCPport)and
itcanserveonlyacertainmaximumnumberofrequestspersecond(RPS,alsoknownasqueriespersecondor
QPS)dependingon:

itsownsettings,
theHTTPrequesttype,
whetherthecontentisstaticordynamic,
whetherthecontentiscached,and
thehardwareandsoftwarelimitationsoftheOSofthecomputeronwhichthewebserverruns.

Whenawebserverisneartooroveritslimit,itbecomesunresponsive.

Causesofoverload

Atanytimewebserverscanbeoverloadeddueto:

Excesslegitimatewebtraffic.Thousandsorevenmillionsofclientsconnectingtothewebsiteinashort
interval,e.g.,Slashdoteffect
DistributedDenialofServiceattacks.Adenialofserviceattack(DoSattack)ordistributeddenialofservice
attack(DDoSattack)isanattempttomakeacomputerornetworkresourceunavailabletoitsintendedusers
Computerwormsthatsometimescauseabnormaltrafficbecauseofmillionsofinfectedcomputers(not
coordinatedamongthem)
XSSvirusescancausehightrafficbecauseofmillionsofinfectedbrowsersand/orwebservers
InternetbotsTrafficnotfiltered/limitedonlargewebsiteswithveryfewresources(bandwidth,etc.)
Internet(network)slowdowns,sothatclientrequestsareservedmoreslowlyandthenumberofconnections
increasessomuchthatserverlimitsarereached
Webservers(computers)partialunavailability.Thiscanhappenbecauseofrequiredorurgentmaintenance
orupgrade,hardwareorsoftwarefailures,backend(e.g.,database)failures,etc.inthesecasesthe
https://en.wikipedia.org/wiki/Web_server 3/5
1/26/2017 WebserverWikipedia

remainingwebserversgettoomuchtrafficandbecomeoverloaded.

Symptomsofoverload

Thesymptomsofanoverloadedwebserverare:

Requestsareservedwith(possiblylong)delays(from1secondtoafewhundredseconds).
ThewebserverreturnsanHTTPerrorcode,suchas500,502,503,504,408,oreven404,whichis
inappropriateforanoverloadcondition.
Thewebserverrefusesorresets(interrupts)TCPconnectionsbeforeitreturnsanycontent.
Inveryrarecases,thewebserverreturnsonlyapartoftherequestedcontent.Thisbehaviorcanbe
consideredabug,evenifitusuallyarisesasasymptomofoverload.

Antioverloadtechniques

Topartiallyovercomeaboveaverageloadlimitsandtopreventoverload,mostpopularwebsitesusecommon
techniqueslike:

Managingnetworktraffic,byusing:
FirewallstoblockunwantedtrafficcomingfrombadIPsourcesorhavingbadpatterns
HTTPtrafficmanagerstodrop,redirectorrewriterequestshavingbadHTTPpatterns
Bandwidthmanagementandtrafficshaping,inordertosmoothdownpeaksinnetworkusage
Deployingwebcachetechniques
Usingdifferentdomainnamestoservedifferent(staticanddynamic)contentbyseparatewebservers,i.e.:
http://images.example.com
http://www.example.com
Usingdifferentdomainnamesand/orcomputerstoseparatebigfilesfromsmallandmediumsizedfilesthe
ideaistobeabletofullycachesmallandmediumsizedfilesandtoefficientlyservebigorhuge(over10
1000MB)filesbyusingdifferentsettings
Usingmanyinternetservers(programs)percomputer,eachoneboundtoitsownnetworkcardandIP
address
Usingmanyinternetservers(computers)thataregroupedtogetherbehindaloadbalancersothattheyactor
areseenasonebigwebserver
Addingmorehardwareresources(i.e.RAM,disks)toeachcomputer
TuningOSparametersforhardwarecapabilitiesandusage
Usingmoreefficientcomputerprogramsforwebservers,etc.
Usingotherworkarounds,especiallyifdynamiccontentisinvolved

Marketshare
BelowarethelateststatisticsofthemarketshareofthetopwebserversontheInternetbyNetcraftFebruary2016
WebServerSurvey(http://news.netcraft.com/archives/2016/02/22/february2016webserversurvey.html).

Product Vendor January2016 Percent February2016 Percent Change


Apache Apache 304,271,061 33.56% 306,292,557 32.80% 0.76
IIS Microsoft 262,471,886 28.95% 278,593,041 29.83% 0.88
nginx NGINX,Inc. 141,443,630 15.60% 137,459,391 16.61% 0.88
GWS Google 20,799,087 2.29% 20,640,058 2.21% 0.08

Apache,IISandNginxarethemostusedwebserversontheInternet.

https://en.wikipedia.org/wiki/Web_server 4/5
1/26/2017 WebserverWikipedia

Seealso
Server(computing)
Applicationserver
Comparisonofwebserversoftware
HTTPcompression
Opensourcewebapplication
SSI,CGI,SCGI,FastCGI,PHP,JavaServlet,
JavaServerPages,ASP,ASP.NET,SAPI
Variantobject
Virtualhosting TheLAMP(softwarebundle)(hereadditionally
Webhostingservice withSquid),composedentirelyoffreeandopen
Webproxy sourcesoftware,isahighperformanceandhigh
Webservice availabilityheavydutysolutionforahostile
environment
References
1."Whatiswebserver?' ".webdevelopersnotes.20101123.Retrieved
20101123.

AwebserverisacomputersystemthatprocessesrequestsviaHTTP,the
basicnetworkprotocolusedtodistributeinformationontheWorldWide
Web.
Marketshareofmajorwebservers
Externallinks
RFC2616,theRequestforCommentsdocumentthatdefinestheHTTP1.1protocol.
C64WEB.COM(http://www.c64Web.com/)Commodore64runningasawebserverusingContiki

Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Web_server&oldid=758963666"

Categories: Servers(computing) Webserversoftware Websitemanagement Webdevelopment

Thispagewaslastmodifiedon8January2017,at14:37.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.
Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisaregisteredtrademark
oftheWikimediaFoundation,Inc.,anonprofitorganization.

https://en.wikipedia.org/wiki/Web_server 5/5

You might also like