Page 295 - DCAP101_BASIC_COMPUTER_SKILLS
P. 295

Basic Computer Skills


                        Notes          GET /path/file.html HTTP/1.1
                                       Host: www.example.com
                                       The Web server on  www.example.com will append the given path to the path of its root
                                       directory. On an Apache server, this is commonly /home/www (On UNIX machines, usually/
                                       var/www).  The result is the local file system resource:
                                       /home/www/path/file.html
                                       The Web server then reads the file, if it exists and sends a response to the client’s Web
                                       browser. The response will describe the content of the file and contain the file itself or an
                                       error message will return saying that the file does not exist or is unavailable.

                                       14.1.3 Load Limits
                                       A Web server (program) has defined load limits, because it can handle only a limited
                                       number of concurrent client connections (usually between 2 and 80,000, by default between
                                       500 and 1,000) per IP address (and TCP port) and it can serve only a certain maximum
                                       number of requests per second depending on:
                                           its own settings;
                                           the HTTP request type;
                                           content origin (static or dynamic);
                                           the fact that the served content is or is not cached;
                                           the hardware and software limitations of the OS where it is working;
                                       When a Web server is near to or over its limits, it becomes unresponsive.

                                       14.1.4 Kernel-mode and User-mode Web Servers
                                       A Web server can be either implemented into the OS kernel, or in user space (like other
                                       regular applications).
                                       An in-kernel Web server (like TUX on GNU/Linux or Microsoft IIS on Windows) will
                                       usually work faster, because, as part of the system, it can directly use all the hardware
                                       resources it needs, such as non-paged memory, CPU time-slices, network adapters, or
                                       buffers.
                                       Web servers that run in user-mode have to ask the system the permission to use more
                                       memory or more CPU resources. Not only do these requests to the kernel take time, but
                                       they are not always satisfied because the system reserves resources for its own usage and
                                       has the responsibility to share hardware resources with all the other running applications.
                                       Also, applications cannot access the system’s internal buffers, which causes useless buffer
                                       copies that create another handicap for user-mode web servers. As a consequence, the only
                                       way for a user-mode web server to match kernel-mode performance is to raise the quality
                                       of its code to much higher standards, similar to that of the code used in web servers that
                                       run in the kernel. This is a significant issue under Windows, where the user-mode overhead
                                       is about six times greater than that under Linux.

                                       14.1.5 Overload Causes
                                       At any time web servers can be overloaded because of:
                                           Too much legitimate web traffic. Thousands or even millions of clients connecting to
                                           the web site in a short interval, e.g., Slashdot effect;
                                           Distributed Denial of Service attacks;
                                           Computer worms that sometimes cause abnormal traffic because of millions of infected
                                           computers (not coordinated among them);




             288                               LOVELY PROFESSIONAL UNIVERSITY
   290   291   292   293   294   295   296   297   298   299   300