Web Servers

 <  Day Day Up  >  


If you decide to run your Web server, it is important to consider how they work. To many, Web servers seem mystical. In reality, a Web server is just a computer running a piece of software that fulfills HTTP requests made by browsers. In the simplest sense, a Web server is just a file server, and a very slow one at times. Consider the operation of a Web server resulting from a user requesting a file, as shown in Figure 16-3. Basically, a user just requests a file and the server either delivers it back or issues some error message, such as the ubiquitous 404 not found message.

click to expand
Figure 16-3: Web server operation overview

However, a Web server isn't just a file server because it also can run programs and deliver results. In this sense, Web servers also can be considered application servers-if occasionally simple or slow ones.

Web Server Components

A Web server is composed of both hardware and software. The primary operation of a Web server is to copy the many ( generally small) files making up a Web page from disk to network as fast as possible for numerous simultaneous users. A secondary mission is to run programs for numerous individuals and deliver the results as fast as possible. Given these requirements, consider the hardware components of a Web server shown in Table 16-1.

Table 16-1: Web Server Hardware Issues

Hardware
Component

Considerations

Processor

While a fast processor seems key to a fast Web server, the reality is that computational requirements of a Web server are limited. Multiple processors may be more useful than a single fast processor when dealing with numerous requests made on a server.

Memory

A Web server may need a large amount of RAM to hold numerous individual processes running server-side programs for users or fulfilling file requests. Furthermore, memory is useful for caching commonly requested content.

Bus

Web data will constantly move from disk to memory to network. Don't limit the data path with a slow bus.

Disk drive

Because a Web server's primary task is delivering files to a user, a high-speed disk drive that is kept optimized is a primary goal. Spend extra on drives with high-speed adapters.

Network interface

Once files are retrieved from disk, they are delivered back to the user via the network. Don't limit a server by its network interface card. For high-volume servers, multiple network interfaces may be mandatory.

Other

Most other aspects of a Web server have little bearing on the delivery of a site. However, some peripherals such as tape drives or other backup storage facilities are mandatory for site maintenance.

In addition to getting the best hardware you can afford, it is important to consider that the operating system running on the hardware and the available server and development software options are going to have a great effect on the speed of the Web server. In general, given that Web servers have to deal with multiple requests simultaneously and need a rich set of development options, most developers tend to use either Windows NT/2000/2003 or some variant of UNIX, including Linux, for their operating system. Table 16-2 presents the major operating system choices as well as some of the issues in using them for Web serving.

Table 16-2: Operating Systems and Web Serving Considerations

Operating System

Pros

Cons

UNIX

-Tends to run on fast hardware such as UltraSparc systems.
-Very flexible development environment.
-High-end applications and servers are available.

-Can be complicated to use and difficult to set up and maintain.
-Labor costs may be high.
-Buy-in costs for hardware and software are relatively high.

Windows NT/
2000/2003

-Runs on a wide range of hardware.
-Many servers and development tools available.
-Basic administration is simple.

-May require multiple servers for high-volume sites.
-Advanced administration may rival -UNIX in difficulty.
-Guaranteeing server stability and security can be troublesome .

Linux

-Available on low-end equipment.
-Cost is low.
-Many servers and development tools available.

-Like standard UNIX, can be complicated to use and difficult to maintain.
-Lacks some commercial software support.

Windows 98/
ME/XP

-Easy to run.
-Low equipment costs.
-Inexpensive software.

-Not as robust as NT or UNIX for server applications.
-Selection of Web software is limited, compared to Windows Server or UNIX variants.
-Similar security and stability issues like Windows server environments.

Macintosh

-Easy to run and administer.
-Relatively low equipment costs.
-Inexpensive software.

-Traditional Macintosh OS is not suitable for Web serving, though the UNIX-based OS X is very well-suited for it.
-Selection of Web software is limited, but is growing fast given OS X's UNIX core .
-Traditional Mac OS not as robust as -NT or UNIX for serving, but Mac OS X very stable.

While Table 16-2 presents a good overview of some of the issues faced when choosing one operating system over another for a Web server, the decision may often be based on familiarity or personal taste. While one person may argue about the merits of UNIX or Linux, introducing such a server into an environment with heavy Windows investment would be foolish. The bottom line is to always remember suitability and total cost over time. A relatively low-traffic site for a school might do well on an older Macintosh. A Windows system might make a great departmental server in a corporation that favors Windows systems. A Linux system might appeal to a technical-minded individual looking to avoid spending money on hardware and software, and a high-end Sun server running Solaris might be appropriate for a large e-commerce venture. Some sites may find that a server-appliance that does not directly expose operating system issues may also be appropriate if maintenance is a significant concern. The point is always to choose an operating system for a server based on the practicality of performance, development, and long- term maintenance characteristics of the OS.

Web Server Software

Once the hardware and operating system are selected, it is time to consider which Web server package to use. A few years ago, there were only two major Web servers available: NCSA's httpd server for UNIX and CERN's httpd server for UNIX, both free servers that required a fairly substantial knowledge of UNIX and programming. Today, there are dozens of different Web servers-both commercial and freeware-available on a variety of machines. Rather than considering all Web servers in your decision, it might be wise to look at the most common Web servers used. On the basis of surveys and analysis of reachable servers on the Internet (www. netcraft .com), the following are considered to be some of the most common Web servers used, though their exact market percentage is a topic of hot debate.

Apache

Zeus

Microsoft's IIS

WebStar

Sun servers (formerly IPlanet and Netscape)

Domino

A discussion of each of the popular Web servers follows . This should by no means be considered as approval of these products, but rather just a synopsis of each product highlighting some of its known characteristics.

Tip  

Serverwatch (www.serverwatch.com) provides links and reviews of most of the popular Web servers available.

Apache (http://www.apache.org/)

A descendant of NCSA's httpd server, Apache is probably the most popular Web server on the Internet, at least as far as public Web sites are concerned . Apache's popularity stems from the fact that it is free and fast. It is also very powerful, supporting features like HTTP 1.1, extended server-side includes (SSIs), a module architecture similar to NSAPI/ISAPI, and numerous free modules that perform functions such as content negotiation, text compression, spell checking, and much more. However, Apache is not for everyone. The main issue with Apache is that it isn't a commercial package. Some firms are hesitant to run their mission-critical systems on a user-supported product. However, as with operating systems like Linux, various third parties offer commercial implementations of Apache or sell support for the free version. Another potential limiting factor for Apache is that the system currently is mainly for UNIX or Linux system variants including Mac OS X. Although there is a port of Apache to Windows 32-bit systems, the server was initially built for popular UNIX and Linux variants. The lack of heavy Windows support may limit the use of Apache within many Microsoft-centric enterprises , but the Apache 2.0 release aims to change that. However, given the development integration Microsoft IIS provides, it may be a hard sell to the Windows crowd . Probably the most troublesome aspect of Apache for some developers is that it may require modification of configuration files or even compilation in order to install properly. If you like to tinker or desire speed, have a UNIX or Linux system, or don't have a lot of money, then Apache might just be for you. You'll be in good company; some of the largest Web sites on the Internet swear by this server.

Note  

For Web trivia buffs, the name "Apache" is derived from the description of the software as a patched version of NCSA. Think "a patchy NCSA server."

Microsoft Internet Information Services (http://www.microsoft.com/iis/)

IIS is Microsoft's server for Windows NT/2000/XP/2003. Other Windows variants also support a similar but much less powerful version of IIS called the Personal Web Server (PWS). While PWS is certainly popular, of the two, most organizations favor IIS. One very important aspect of IIS is that it is very tightly integrated with the Windows environment. In fact, today it is hard to distinguish IIS as a stand-alone service within Windows 2000. Unfortunately, being so Windows-specific is also one of the main problems with IIS. The tight integration has lead to numerous security exploits in IIS and the operating system has not proved to be quite as scalable as some UNIX-based servers. With new Microsoft clustering technologies and integration with a transaction processor, this scalability problem is likely to change. Microsoft also promises great improvements in security, which would certainly be welcome. However, for an intranet environment-particularly one with heavy Microsoft investment-it is difficult to beat the features offered by IIS, particularly its Active Server Pages and .NET development platform and its integration with other Microsoft technologies and products. The price for IIS is currently a major positive point for the software-it's freely bundled with the operating system.

Sun (Servers formerly known as iPlanet or Netscape) (http://www.sun.com/software/)

Sun servers, born from the iPlanet joint venture between Sun and Netscape after the merger between Netscape and AOL, constitute a large number of Web servers. These servers continue a long history started by Netscape of supporting high-end Web and application servers running on most major variants of UNIX (Solaris, SunOS, AIX, HP-UX, Digital UNIX, and IRIX) as well as on Windows. The servers are well developed, as they represent more than four generations of software releases. The servers are also very developer friendly and powerful, with support for databases and directory services, content management, HTTP 1.1, and a variety of other features. Given Sun's involvement, a focus on Java is core to the server offering. If you are in a cross-platform or UNIX environment and you are looking for commercial-quality Web serving solutions, then consider using these servers.

4D WebStar (http://www.webstar.com/)

Initially a popular Web server for the Macintosh originally based on MacHTTPD, WebStar integrates well with the traditional Macintosh interface. The server has solid security features and supports both native Macintosh technologies as well as UNIX-style CGI programs, PHP, a Java virtual machine for server-side Java, and extended SSI. The performance of most Macintosh Web servers has often left much to be desired, though it is improving and is probably more than adequate for intranets or small Web sites. Today, in an OS X environment most folks use the Apache server, which is included in the OS X distribution.

Lotus Domino (http://www.lotus.com/domino)

Domino is an example of the collision between traditional Web serving and messaging and groupware. Domino runs on Windows NT, variants of UNIX, and even large IBM systems such as AS/400s. It is often used in corporate intranet and extranet environments where workflow and integration with messaging and backend systems may be more important than raw Web serving performance.

Zeus (http://www.zeus.com)

Finally, we have Zeus as a contender for the fastest Web server. This server is becoming popular with extremely high volume Web sites. The Zeus server does not lack development capabilities, as it provides not only Java compatibility but supports both IIS's ISAPI interface and the NSAPI interface introduced on Netscape Enterprise servers.

Making the Choice

There are numerous Web server software choices. Remember that different packages will have different performance characteristics. Using the same hardware, one Web server software package may far outperform another. When planning to build a Web server, start either from the hardware and build up or from the particular software and build down, picking the best possible hardware compatible with the selected server. If you make good software and hardware choices, the performance of the site can be significantly improved. Always try to base your choices on usage requirements, such as a target number of simultaneous users or requests per minute or second. However, don't forget that you will have to maintain the site. If you are unfamiliar with UNIX systems and your company uses only Windows servers, your decision is probably already made for you. Once all the requirements of the site have been carefully determined, it is possible to best choose how to serve a site.

How Web Servers Work

When it comes to the physical process of publishing documents, the main issues are whether to run your own server or to host elsewhere in conjunction with Web server software and hardware. However, a deeper understanding of how Web servers do their job is important to understand potential bottlenecks. Recall that, in general, all that a Web server does is listen for requests from browsers or, as they are called more generically, user agents . Once the server receives a request, typically to deliver a file, it determines whether it should do it. If so, it copies the file from the disk out to the network. In some cases, the user agent might ask the server to execute a program, but the idea is the same. Eventually, some data is transmitted back to the browser for display. This discussion between the user agent, typically a Web browser, and the server takes place using the HTTP protocol.



 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net