introduction to web server and its illustration

Reading Time: 3 minutes

what is web server?

A web server is a computer that stores web content. Web servers are basically use to host websites. There are also other web servers such as games, storage, FTP, and email.

A website is a collection of web pages, and a web server is software that responds to requests for web resources.

Web server Working

The web server responds to client requests in one of two ways:

  • Sends the file to the client associated with the requested URL.
  • Generate a response by calling a script and communicating with the database.
  • When the client submits a request for a web page, if the requeste page is found, the web server searches for the requeste page and sends it to the client using an HTTP response.
  • If the requested web page cannot be found, the web server sends an HTTP response: Error 404 Not found.
  • When the client requests another resource, the web server connects to the application server and data store to create an HTTP response.

The web server architecture takes two approaches:

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

Concurrent Approach:

The concurrent approach allows the web server to process multiple client requests at the same time. This can be achieve in the following ways:

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

Multi-processing:

  • A single process (parent process) initiates multiple single-threaded child processes and distributes incoming requests to these child processes. Each of the dependent processes is responsible for handling a single request.
  • It is the responsibility of the higher level process to monitor the load and decide whether to terminate or branch the process

Multi-thread:

Unlike multi-process, it creates multiple single-threaded processes.

Hybrid:

  • This is a combination of the above two approaches. With this approach, multiple processes are create, and each process starts multiple threads.
  • Each thread handles the connection. Using multiple threads in one process reduces the burden on system resources.

Examples:

The most important web server currently available:

1. Apache HTTP Server:

This is the world’s most popular web server develope by the Apache Software Foundation. Apache Web Server is open source software that can be install on almost any operating system, including Linux, UNIX, Windows, FreeBSD, Mac OS X, and more. About 60% of web server machines are running Apache web servers.

2. Internet Information Services (IIS):

Internet Information Server (IIS) is Microsoft’s high-performance web server. This web server runs on Windows NT / 2000 and 2003 platforms (and may also run on newer versions of Windows in the future). IIS comes with Windows NT / 2000 and 2003. IIS is tightly integrated with the operating system, so it’s relatively easy to manage.

3.Lighttpd:

lighttpd is also a free web server pronounced lightty and distributed with the FreeBSD operating system. This open source web server is fast, secure, and uses 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 Sun Microsystems web server is suitable for medium and large websites. The server is free, but not open source. However, it runs on Windows, Linux, and UNIX platforms. The Sun Java System web server supports a variety of languages, scripts, and technologies required for Web 2.0, including JSP, Java Servlets, PHP, Perl, Python, Ruby on Rails, ASP, and ColdFusion.

Written by 

Ashi Dubey is a Software Intern at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is Devops. When not working, you will find her with a Book.