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:
- Concurrent Approach
- Single-Process-Event-Driven 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:
- Hybrid method.
- 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
Unlike multi-process, it creates multiple single-threaded processes.
- 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.
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.
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.