When an HTTP request arrives, the Web server starts fetching the resource as requested by the client. While the Web server is busy fetching resources, client computers might send more requests. These requests are either ignored or handled simultaneously by the Web server.

Web servers that ignore other requests or even queue them while they are busy are called single-threaded Web servers. This means that they are incapable of handling high Web server traffic. However, these types of Web servers are ideal for Web sites that encounter low or moderate traffic. A few good examples of single-threaded Web servers are thttpd, Medusa, and Zeus.

Web servers that can handle simultaneous requests, manage the requests in two ways. Either they start a new process or they start a new thread within a process. Web servers that start a new process on each request are called multiprocessed Web servers, while those that start a new thread within the main process are called multithreaded Web servers.

IIS on the Windows platform is an example of a multithreaded Web server. On the other hand, Apache on the Unix platform is a multiprocessed Web server. However, due to limitations of the Windows platform (namely, the lack of support for forking—a standard way of starting a new process in Unix), Apache follows a multithreaded mode of functioning for Windows platforms.

Note Starting off a new process on every Web request is typically an expensive task in terms of server resources. Therefore, in order to improve its performance, the Apache Web server follows a preforking model. As a result, it starts several new processes before a new request arrives. As soon as a request arrives, it simply hands the request over to one of these idle processes.

Post By Editor (2,827 Posts)

Website: →