The Internet acts as a source of a plethora of information to us and all we need to do if we want any information is to just query the internet and then we will get the desired response.
But who provides this information to us and how? All this is facilitated by what is called the Web Server. Along with it, there are browsers as applications we use such as Internet Explorer, Mozilla Firefox, Chrome, Safari, etc to interact with the web and browse & retrieve the files on web servers known as Web Clients.
Web Servers are basically simple computer programs that dispense the web page when they are requested using the web client. The machines on which this program runs are usually called a server, with both the names web server and server almost used interchangeably.
Generally, many people, when they think of web servers, think of them being some high-powered computers, while this is correct to some extent, some high-powered computers are also called web servers, but these computers are built with the purpose of web hosting. In web hosting, the web servers enable the hosting providers to handle multiple domains (or multiple websites) on a single server. But, normally, when someone refers to a web server, it means the piece of software that can be downloaded on the computer system.
When is a web server required?
Generally, web servers are used by web hosting companies and professional web app developers. But, actually, anyone who satisfies one of the below categories can use it-
- One who owns a website (to make the local copy on their system resemble what is on the internet).
- One who wants to use server-side technologies, such as PHP or ColdFusion, can also use the web server.
How do Web servers work?
A page on the internet can be viewed, when the browser requests it from the web server and the web server responds with that page. A simple diagrammatic representation of this is given below in the figure:

The simple process consists of 4 steps, they are:
- Obtaining the IP Address from the domain name: Our web browser first obtains the IP address the domain name (for e.g., for this page the domain name is www.geeksforgeeks.org) resolves to. It can obtain the IP address in 2 ways-
- By searching in its cache.
- By requesting one or more DNS (Domain Name System) Servers.
- Browser requests the full URL: After knowing the IP Address, the browser now demands a full URL from the web server.
- The web server responds to request: The web server responds to the browser by sending the desired pages, and in case, the pages do not exist or some other error occurs, it will send the appropriate error message.
For example:
You may have seen Error 404, while trying to open a webpage, which is the message sent by the server when the page does not exist.
Another common one is Error 401 when access is denied to us due to incorrect credentials, like username or password, provided by us.
- The browser displays the web page: The Browser finally gets the webpages and displays it, or displays the error message.
Performance Measure of web servers: There are various parameters that define the performance of a web server that are measured under various loads and requests and responses from clients and servers.
- RPS: RPS stands for Requests per second. It determines the maximum number of requests a server can handle from various clients. It depends on various other things such as HTTP version, type of HTTP requests, etc.
- Latency: Network latency is the response time that a server takes to process each clientâs request. This is calculated in milliseconds.
- Throughput: It is defined as the amount of data transferred in a given amount of time. It is calculated in bytes per second. Where latency should be very low for an ideal server, throughput should be very high.
- Concurrency: Since RPS, latency, and throughput can fluctuate highly depending on the number of active clients and connections, concurrency is another parameter that is used to check the performance of a web server. This is supported by web servers under various specifications such as server configuration, type of operating system, and hardware resources.
Popular Web Servers: There are quite a few web servers available, like, Apache, Microsoft IIS, Nginx Web Server, and LightSpeed Web Server. But, the two most popular ones are-
- Apache HTTP Server: It is the most popular web server available and is widely used. It is developed and maintained by Apache Software Foundation. The Software is produced under the Apache License, which makes it free and open source.
It is available for a variety of operating Systems- Windows, Mac OS X, Unix, Linux, Solaris, Novell Netware and FreeBSD.
- Microsoft Internet Information Service: Microsoft IIS (Internet Information Service) is the second most popularly used web server, and its market share is increasing quite rapidly with each passing day and is likely to overhaul Apache in the upcoming years.
IIS server has all the features just like Apache, but it is not open source. It is developed and maintained by Microsoft, thus it works with all the Windows operating system platforms.
Summarizing it all, web servers can be used by an individual or by web hosting provider companies. In case an individual does so, he will be locally hosting the website only on his own system (i.e., the contents of the website can be accessed only on the local system and not on any other system), whereas when hosting provider companies hosts them, the website can be viewed by anyone across the globe. An individual can also host his website publicly with his web server, but for that, one must have a leased line internet connection (to get a dedicated IP address) and a DNS server to connect it with the domain of the website (generally not preferred due to security reasons).
Similar Reads
How do Web Servers work?
The Internet acts as a source of a plethora of information to us and all we need to do if we want any information is to just query the internet and then we will get the desired response. But who provides this information to us and how? All this is facilitated by what is called the Web Server. Along
5 min read
How to Build a Simple Web Server with Golang?
Golang is a procedural programming language ideal to build simple, reliable, and efficient software. Creating Web Servers Using Golang: Initialize a project Create a project folder with a .go file inside eg. server.go. Directory structure: The server.go file: C/C++ Code package main import ( "f
2 min read
Web Server and Its Type
Web Servers play an important role in delivering web applications to users. They process requests from browsers and serve the necessary content, such as web pages, images, and data, ensuring a smooth online experience. Understanding the types of web servers helps in choosing the right one based on p
8 min read
Components of Web Services
Web services are software systems designed to enable machine-to-machine interaction over the internet. They are used to share data and functionality between different applications and systems. Here are some of the different types of web services and their importance, which are described below: SOAP
5 min read
How to Build a Simple Web Server with Node.js ?
Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside a browser. You need to remember that NodeJS is not a framework, and itâs not a programming language. Node.js is mostly used in server-side programming. In this article, we will discuss how to make
3 min read
How to call web services in HTML5 ?
In this article, we will see how to call the Web Services in HTML5, along with knowing different methods for calling the web services & understand them through the examples. Web services in HTML5 are a set of open protocols and standards that allow data to be exchanged between different applicat
3 min read
How to choose Web Hosting Server and Web Domain ?
âToday itâs not about âget the trafficâ â itâs about âget the targeted and relevant traffic.ââ â Adam Audette When we want to host business online then the things that come in mind are Which Domain name to buy? Which domain is good? What are its features? What is hosting? What is itâs use? And vario
4 min read
What is Nginx (Web Server) and how to install it ?
What is a Web Server? Whenever you open your browser, type a URL and then click enter. Basically, you are requesting the contents of that URL. Ever wondered where the content are? Yes, you're right those are contents placed on remote computers which, after accepting your request, send the contents o
7 min read
Difference between Web Server and Web Host
A web server is a computer that stores your website and sends it to people when they visit. A web host is a company that provides the space and support needed to keep your website online. Simply put, the web server is the machine that delivers your website, and the web host is the service that makes
3 min read
Servers, streams and sockets in Node
Node.js Server Node.js is a javascript framework for writing Server-side applications. A Node.js server provides the mechanisms for connecting to a service and sending/receiving data. It achieves this through TCP or UDP connections. Developers can hence create their own server and test their app dep
5 min read