Web server is a computer where the website and web content is stored. Basically web server is used to host the websites but it can have different purpose too.

Web site is collection of web pages while web server is a software that respond to the request for web resources.

How Web Server Works?

Web server respond to the client request in either of the following two ways:

  • When the User aka Client requests a file in most case webpage as a resource, web browser sends the request to the web server through HTTP.
  • The HTTP Server accept the request and finds the resource and process on it.
  • After processing it produce response and send back to the Clients web browser as a result.
  • On successfull response web server returns the 200 status code.
  • if requested resource is not found it returns 404 status code also know as error 404 Page Not Found.
  • If client has requested for some other resources then the web server will contact to the application server and data store to construct the HTTP response.
Web Server Life Cycle

Architecture of web server.

Web Server Architecture follows the following two approaches:

  1. Concurrent Approach
  2. Single-Process-Event-Driven Approach.

Concurrent Approach

Concurrent approach allows the web server to handle multiple client requests at the same time. It can be achieved by following methods:

  • Multi-process
  • Multi-threaded
  • Hybrid method.

Multi-processing

In this a single process (parent process) initiates several single-threaded child processes and distribute incoming requests to these child processes. Each of the child processes are responsible for handling single request.

It is the responsibility of parent process to monitor the load and decide if processes should be killed or forked.

Multi-threaded

Unlike Multi-process, it creates multiple single-threaded process.

Hybrid

It is combination of above two approaches. In this approach multiple process are created and each process initiates multiple threads. Each of the threads handles one connection. Using multiple threads in single process results in less load on system resources.

Examples

Following table describes the most leading web servers available today:

S.N.Web Server Descriptino
1Apache HTTP Server
Most popular web server in the world developed by the Apache Software Foundation.
Apache web server is an open source software and can be installed on almost all operating systems including Linux, UNIX, Windows, FreeBSD, Mac OS X and Android.
About 60% of the web server machines run the Apache Web Server.
2.Internet Information Services (IIS)
The Internet Information Server (IIS) is a high performance Web Server from Microsoft.
This web server runs on Windows NT/2000 and 2003 platforms.
IIS comes bundled with Windows NT/2000 and 2003; Because IIS is tightly integrated with the operating system so it is relatively easy to administer it.
3.Lighttpd
The lighttpd, pronounced lighty is also a free web server that is distributed with the FreeBSD operating system.
This open source web server is fast, secure and consumes much less CPU power.
Lighttpd can also run on Windows, Mac OS X, Linux and Solaris operating systems.
4.Sun Java System Web Server
This web server from Sun Microsystems is suited for medium and large web sites.
Though the server is free it is not open source.
It however, runs on Windows, Linux and UNIX platforms.
The Sun Java System web server supports various languages, scripts and technologies required for Web 2.0 such as JSP, Java Servlets, PHP, Perl, Python, and Ruby on Rails, ASP and Coldfusion etc.
5.Jigsaw Server
Jigsaw (W3C’s Server) comes from the World Wide Web Consortium.
It is open source and free and can run on various platforms like Linux, UNIX, Windows, and Mac OS X Free BSD etc.
Jigsaw has been written in Java and can run CGI scripts and PHP programs.

Deals Of The Day

Discover more from Easymux

Subscribe now to keep reading and get access to the full archive.

Continue reading