Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2003

Apache 2.0 on Win2K

The popular open-source Web server extends its Windows capabilities
RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Using Apache to Create Virtual Hosts

Download the Code Here

 See corrections to this article

Web servers have become one of the fundamental building blocks of the business world's IT infrastructure. The two big names in today's Web server market are Microsoft IIS, which has long dominated the Windows Server market, and the Apache HTTP Server, which has been the favorite for other OS implementations, most notably UNIX.

In recent years, IIS has come under fire for various reasons, especially for security concerns. But what other viable Web server options have Windows shops had? Apache, which the Apache Group manages, is a powerful, sophisticated, and mature Web server that many regard as a crowning achievement of the open-source community. And many companies that use Apache in their products—for example, IBM, which uses Apache in its WebSphere product—actively contribute to and support Apache, so the Web server continues to grow and adapt to the fast-changing business environment. However, the product's use on Windows platforms has been limited—until now.

With the release of Apache 2.0, this popular, highly reliable and scalable Web server has increased its portability and performance on the Windows platform and improved extensibility across all platforms. The new version's improvements mean that you can use Apache's power to your advantage, even if your organization runs Windows 2000 or Windows NT.

Improved Portability and Performance
The Apache Group's original goals were security and stability. In Apache 1.3, the development team created a secure, reliable, and highly available server that could scale under heavy loads. That version has long been the Web server of choice on just about every non-Windows platform (e.g., Linux, OS/2, Sun Microsystems' Solaris) and even runs on Win2K, NT, and Windows 98. However, Apache 1.3's high level of scalability doesn't extend to the product's Windows port, so Apache hasn't been a true competitor of IIS in organizations that run Windows. The Apache Group decided a new design was necessary to deal with key concerns across all platforms, most notably code complexity (which would have made Apache increasingly more difficult to improve and fix over time) and performance.

The Apache Group's efforts to support more platforms originally came in the form of conditional compilation, which means that only certain code is compiled into a program, depending on whether a stated condition (e.g., the OS in use is Solaris) is true. As the number of supported platforms expanded and variations among supported platforms increased, the Apache code base rapidly grew extremely complex and the use of conditional compilation quickly became a hindrance to development. Performance was another factor that the Apache Group needed to deal with. Apache relied on some basic assumptions about how to treat CPUs, I/O, memory, and processes. This reliance wasn't a problem on most UNIX systems because Apache was developed on and primarily for that platform. However, the architectural model around which Apache was built didn't work well on non-UNIX OSs and even on some types of UNIX, so these assumptions led to scalability problems on those platforms.

The Apache Group decided to deal with both concerns in one fell swoop, building Apache 2.0 on an abstract layer and tuning that layer's implementation to the underlying platform. As a result, Apache 2.0 provides major improvements in both portability and performance.

One of the abstractions now built into Apache 2.0 is the Apache Portable Runtime (APR). As Figure 1, page 118, shows, the APR serves as an interface between the OS and the Apache HTTP Server and handles system services such as I/O, shared memory, and child-process management. The APR, however, doesn't affect the model that Apache uses when handling concurrent client connections, which was Apache's primary performance problem on Windows. Earlier Apache versions assume that the underlying OS can efficiently create child processes. But some OSs, such as Windows and IBM AIX, better support multithreading, so using child processes to handle client-network connections isn't an optimal solution on those platforms. Instead, Apache needed to use a thread to handle each connection. (Multithreading isn't as resilient to errors as using multiple processes. An errant thread can cause problems for other threads, whereas in a multiple-process design, each process is essentially independent. However, Windows servers use the multithreading model, so a certain—albeit minimal—trade-off of reliability for the sake of performance was necessary.)

The Apache Group's solution—Multi-Processing Modules (MPMs)—are both theoretically simple and elegant in implementation. MPMs create an abstraction between Apache and the method used to handle concurrent client connections. The idea is that the Apache Group—or a developer who wants to support a new platform—builds an MPM specific to a given architecture or feature specification (e.g., using child processes, multithreading, or the combination that best fits a particular user's needs). During the configuration process, the Apache user chooses the MPM that best suits the user's environment, although by default the configuration file that comes with each port of Apache uses the MPM specific to that platform. Apache then relies on the MPM to handle the low-level details of handling concurrent client connections. For Windows systems, Apache uses the winnt MPM. As Figure 2 shows, this MPM works by having the Apache server create a child process, which then creates and controls the necessary threads to service each client connection. (A parent process is necessary in this case to create a new process if the client process dies.)

Increased Extensibility
Apache 1.3 was already extensible because of the server's reliance on modules, a type of Apache add-on component. A module is simply software that uses the open Apache Module API. Despite the power of the existing Module API, the Apache Group developed a new and improved API for module writers and a new framework from which that API operates. Although this change means that modules written for earlier Apache versions don't work with Apache 2.0, the change increases Apache modules' abilities in several fundamental ways, such as providing a powerful new filtering capability. During configuration, you can use this filtering capability to layer modules and create complex systems. Even better, filtering can simplify the way that modules interact with Apache. For example, under earlier Apache versions, the only way to add Secure Sockets Layer (SSL) support was to modify Apache itself. Under Apache 2.0, however, SSL is simply an add-on module. Table 1 lists several Apache 2.0 modules and their purposes. (To view a list of Apache modules available with the Apache installation, examine the LoadModule directives in httpd.conf and the associated module binaries in \program files\apache group\apache2\modules. To view a more comprehensive list, visit the Apache Web site at http://httpd.apache.org/docs-2.0/mod.)

   Previous  [1]  2  3  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Corrections to this Article:

  • In Dustin Puryear's article "Apache 2.0 on Win2K" (April 2003, http://winnetmag.com, InstantDoc ID 38288), the author says that when installing Apache software you need to "first remove or disable any existing IIS installation." Is this a necessary step, and can Apache and Microsoft IIS coexist?
Top Viewed ArticlesView all articles
PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Ballmer: Xbox 360 'an Unqualified Success'

It's a product line that has consumed tens of billions of dollars of R&D, money that can never be recouped. The most recent version of the product is so endemically buggy that it has suffered from an historic product recall whose value exceeds $1 billion ...

More fun TechEd 2005 Resources

Kevin points out some more TechEd resources ...


IIS and Web Administration Whitepapers The Five Secrets to Controlling Your SharePoint Environment

Extended Validation SSL Certificates

Related Events Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13
Connections returns to Las Vegas for this exciting event where each attendee will receive SQL Server 2008 standard with 1 CAL. Co-located with Microsoft ASP.NET, SQL Server, and SharePoint Connections with over 250 in-depth sessions.

Free Online Event! Virtualization:Get the Facts!
Register now and attend this free, live in-depth online conference on November 13 and 20, 2008, produced by Windows IT Pro. All registrants are eligible to receive a complimentary one-year digital subscription to Windows IT Pro (a $49.95 value)!

Check Out Hyper-V Video on ITTV
Watch Karen Forster's interview on Hyper-V's performance on ITTV.net.

Ease Your Scripting Pains with the Flexibility of PowerShell!
Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer!

PASS Community Summit 2008 in Seattle on Nov 18-21
The don’t-miss event for Microsoft SQL Server Professionals. Register now and you’ll enjoy top-notch Microsoft and Community speakers and more.



Speed Up Your PC!
Try Diskeeper 2008 with InvisiTasking Free Now!

Get Protected -- Data Protection Manager 2007
Protect your virtualized environment with Data Protection Manager

Agent-less Remote Backup Service, Free 30 Day Trial
Award winning remote backup service at a competitive price with no min GB/month. Sign up Now!

ScriptLogic Cartoon Caption Contest
Submit your caption and you will be entered to win $198.42

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

List Your Products in Our Technology Resource Directory
Don't miss the chance to post your free listing in this comprehensive directory for IT and developer professionals, powered by Windows IT Pro. But hurry! Deadline ends Oct. 9.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing