Web Server – Definition :
A Web Server can be simply understood as a system which delivers the content or servers to the end users. The internet is a huge source of information on nearly every topic present on the Earth. Whenever we want any information, we simply query the internet with the keywords and it generates the results instantly. Sometimes, you might have wondered how this is possible? Well, there are few components which makes it possible. Browsers act as a web client which takes in users queries and retrieve the web pages from the Web Server. The web server can be understood as a collection of all the data which are present on the internet.
Web Servers can be simply understood as a system which delivers the content or servers to the end users. It consists of three components :
- Physical Server.
- Operating System.
- Software for HTTP connection.
Web servers are the core of the web hosting. Without web servers, the contents of the websites cannot be visible on the internet. A Web Server displays the web pages through simple programs which are requested by the users using web clients.
Functioning Of A Web Server :
Most of the people, when they hear about Web Servers think it as a high powered computer system. Part of this can be true as many companies use high powered computer systems for hosting multiple domains on a single server but mainly Web Server is referenced to a piece of software which can be downloaded on the user’s system. The previous definition of the web server is a software which runs a website by sending the HTML files over the HTTP connection. But now, the definition has changed. It can be stated as a program that uses the HTTP connection which delivers the XML files to the users from the storage.
When Is A Web Server Required?
Basically, web servers are mostly used by companies which provide web hosting plans for the people to make their website go live. Some of the professional website developers also use a private web server on their own system to make the website live. A web server has to be live 24*7 so that the website never goes down when it is accessed. Another use of a web server can be when a programmer wants to use server-side technologies like PHP and such.
How Does A Web Server Work?
A web page is displayed to the user when the browser (web client) requests it with a query to the web servers. The web server then responds the query with the required web page.
The process can be explained in 4 simple steps :
- Obtain the IP Address: Whenever a domain name is entered, the DNS converts the name to the corresponding IP address.
- Requesting URL: The browser after getting the IP address requests the web page from the web server.
- Web Servers addresses the query: The web server responds to the query with the appropriate web page. If the web page is not found, it forwards the appropriate error message to the browser.
- Displaying the web page: The browser receives the web page from the web server and displays it to the user.
The architecture of a Web Server:
Web Server follows two different type of architecture:
- Concurrent Approach.
- Single Process Event-Driven Approach.
- Concurrent Approach: This approach allows the web server to handle multiple client requests at the same time. There are three different sub-types in Concurrent Approach: Multi-process, Multi-threaded, Hybrid method.
- Single Process Event-Driven Approach: This approach works like how a person on a pizza counter takes orders over the phone. He takes one order and hangs up the call. When the order is ready, he calls the person and informs the person. In this way, the web servers handle multiple requests.
Popular Web Servers:
Due to the advancement of internet, many companies have come out with their web servers like Apache, Microsoft, Light-speed, Nginx web server and others but the most popular are of Apache and Microsoft.
- Apache HTTP Server: Developed and maintained by Apache Software Foundation, Apache HTTP Server is the most popular web servers available on the internet which is preferred by most of the people. Apache made it open source with Apache License attached to it. It works on various operating systems like Windows, Mac OS X, Linux, Solaris and so on.
- Microsoft Internet Information Service: By the name, Microsoft developed the Microsoft IIS which has become the second most popular web server after Apache HTTP server. It contains all the feature but the only limitations is that it is not open source. It works only with the Windows Operating Systems.
So whenever you are viewing a web page on the internet (including this article currently), a web server is running behind trying to fetch the page and display it in your browser!