What is Web Server & How it Works to handle Client Requests?

What is Web Server & How it Works to handle Client Requests?

A Web Server is a machine which works under response and request mechanism. Depending upon the request type and authority web server decides and allow access to the particular resource. The application (Web Server whether IIS or Apache) uses http protocol to communicate between Client and Sever. The full name of http is hypertext transfer protocol. In Client Server architecture Web Servers are the nodes.

How Web Server Works?

  • User enters the URL in browser. (URL stands for uniform resource locator, which is used to uniquely identify a resource in the internet). This URL will contain the host’s address, which can be either IP address or a particular name mapped to the IP address. This name is known as domain name.
  • There will be a DNS server local to the client’s network. DNS server will map the domain name to the particular IP address. Local DNS Server will check whether that IP address is present in the network.
  • If the IP address is not present in the local network, check will be done against other DNS servers in the internet in order to get the IP address corresponding to the domain name provided in the URL.
  • The IP address corresponding to the domain name will be returned back to the browser. (If the IP address of the server itself is entered in the URL, the steps 2, 3, 4 can be avoided).
  • The browser will connect to the particular IP address through the internet.
  • A connection will be established between client (browser) and the server.
  • The browser will send a request (since we are using http, the request is known as http request) for the web page.
  • Server will return http response and that response contains contents of the requested page. (The terms URL, DNS server, http request, http response will be explained in detail later).

Source of Image: http://www.sitetrigger.com