From 1364abab585e6178d2da831e8bc43369999474c3 Mon Sep 17 00:00:00 2001 From: Alok Kumar verma <87599400+alokVerma749@users.noreply.github.com> Date: Tue, 26 Apr 2022 21:35:48 +0530 Subject: [PATCH] Added the answer for the question: 'How Web Servers Works' (#195) * Added the answer for the question: 'How Web Servers Works' * updated the document Added more relevant information about web servers. * Added the answer and also specifies the source * complete required changes --- exercises/devops/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/exercises/devops/README.md b/exercises/devops/README.md index 2890bfc..988a84c 100644 --- a/exercises/devops/README.md +++ b/exercises/devops/README.md @@ -252,6 +252,33 @@ Reliability, when used in DevOps context, is the ability of a system to recover
How a web server works?
+According to MDN Web Docs - + +We can understand web servers using two view points, which is: + + (i) Hardware (ii) Software + +(i) A web server is nothing but a remote computer which stores website's component files(HTML,CSS and Javascript files) and web server's software.A web server connects to + the Internet and supports physical data interchange with other devices connected to the web. + +(ii) On the software side, a web server includes several parts that control how web users access hosted files. At a minimum, this is an HTTP server. An HTTP server is software that understands URLs (web addresses) and HTTP (the protocol your browser uses to view webpages). An HTTP server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user's device. + +## How communication between web server and web browsers established: + + Whenever a browser needs a file that is hosted on a web server, the browser requests the page from the web server and the web server responds with that page. +This communcation between web browser and web server happens in the following ways: + +(1) User enters the domain name in the browser,and the browser then search for the IP address of the entered name. It can be done in 2 ways- + + -By searching in its cache. + -By requesting one or more DNS (Domain Name System) Servers. + +(2) After knowing the IP Address, the browser requests the file via HTTP and the request reaches the correct (hardware) web server. + +(3) The (software) HTTP server accepts the request, finds the requested document, and sends it back to the browser, also through HTTP. (If the server doesn't find the requested document, it returns a 404 response instead.) + +(4) The Browser finally gets the webpages and displays it, or displays the error message. +