APACHE VS IIS by Neeraj Yadav
For
some time, Apache and Microsoft have commanded the lion's share of the
Web server market. While Apache is the clear-cut winner in the Netcraft
and Security Space monthly surveys, Internet Information Server
dominates among Fortune 1000 enterprises.Both are viable choices, and
each carries its own set of pros and cons.
1).IIS
has been an optional component of the Windows Server operating systems
since Windows NT 4.0. Apache, on the other hand, has an older heritage,
having been originally based on the httpd code that some would argue
started the entire Web revolution in the first place. Apache 1.3.x,
which was the production version until 2002, was a largely Unix product
that used a number of tricks to enable it to execute within other
operating systems, including Windows.
2).Execution
EnvironmentIIS and Apache operate very differently and thus have a
variety of advantages of disadvantages. IIS is obviously designed and
available to work only within the Windows environment. In IIS 6.0, the
cooperation between the operating system and the server is greater than
ever.The kernel mode listener, HTTP.sys, listens and accepts requests
from clients, placing the requests into one or more request queues. IIS
then processes the requests in these queues using at least one worker
process to control the execution of the individual requests and
applications.This separate process allows requests to be accepted even
when IIS worker processes aren't technically running, and also enables
finer control on the worker processes that handle requests.Apache 2.0
was a major rewrite from the previous versions. Among the many changes,
the Web server is now directly available on a variety of platforms,
including Windows. The redesign enables it to support a wide array of
platforms in more efficient ways that lead to Unix- and
Windows-specific execution models that make the best use of the OS.The
core of the system is the Apache Portable Runtime (APR), which enables
the Apache core to run on more or less any system with a C compiler. A
number of multi-processing modules (MPMs) then provide the support for
actually accepting and processing requests. Under Unix, this can be the
traditional "forked" model or a newer threaded model making use of the
threading built into most modern kernels. Under Windows, this also uses
a threaded model, which in some respects is similar to the threaded
model used by the worker processes within IIS 6.0.
3).Dynamic
ComponentsThe primary dynamic environment for development within IIS is
Active Server Pages. This is a generic term for a solution that allows
code to be embedded into HTML pages. These ASP pages are parsed by the
server before being supplied to the client as HTML. The ASP system
allows developers to work in a number of different languages, including
Visual Basic, VBScript, JavaScript, Java, and C/C++, along with other
open source alternatives, such as Perl and Python. In addition, IIS
continues to support traditional CGI methods along with its own suite
of filtering and execution systems in the form of ISAPI filters.Apache
is also designed to work with a wide range of languages, either via the
CGI model, or through the use of dynamic modules by directly
incorporating the language interpreter into the Apache environment.
This significantly speeds up the execution of dynamic components for
languages like PHP, Perl, and Python. Both systems support the Java
Server Pages model, and it's possible to migrate most JSP applications
between the two platforms with few changes.
In brief...
IIS pros and cons*
PROS
o easy to get started
o little or no tuning required
o Active Server Pages are easy to use
o integrated ODBC support
o integrated FrontPage support
o GUI and command-line administration interfaces
o large installed base
o availability of development tools
* CONS
o crash may require complete system rebuild and restore from backups
o most additional functionality requires software purchase (e.g. FrontPage)
o a poorly written COM object or looping script can kill the web server
Apache pros and cons*
PROS
o open source project under active development
o large installed base
o support readily available from worldwide developer and user communities
o flexible and powerful URL rewriting
o integrated Perl engine provides direct access to the API
o ODBC interface is available (not aware of any UW use) without cost
o rich feature seto extensible (can link new modules into the core server) *
CONS
oinitial configuration and tuning may be required
o integrated Perl engine significantly increases memory use
o long learning curve for effective use
hope this helps
Cheers