IIS 7.0
Components
IIS7
contains several components that perform important
functions for the application and Web server roles
in Windows ServerŪ 2008. Each component has
responsibilities, such as listening for requests
made to the server, managing processes, and reading
configuration files. These components include
protocol listeners, such as HTTP.sys, and services,
such as World Wide Web Publishing Service (WWW
service) and Windows Process Activation Service
(WAS).
Protocol Listeners
Protocol listeners receive
protocol-specific requests, send them to IIS for
processing, and then return responses to requestors.
For example, when a client browser requests a Web
page from the Internet, the HTTP listener, HTTP.sys,
picks up the request and sends it to IIS for
processing. Once IIS processes the request, HTTP.sys
returns a response to the client browser.
By default, IIS7 provides HTTP.sys
as the protocol listener that listens for HTTP and
HTTPS requests. HTTP.sys was introduced in IIS 6.0
as an HTTP-specific protocol listener for HTTP
requests. HTTP.sys remains the HTTP listener in IIS7,
but includes support for Secure Sockets Layer (SSL).
To support services and
applications that use protocols other than HTTP and
HTTPS, you can use technologies such as Windows
Communication Foundation (WCF). WCF has listener
adapters that provide the functionality of both a
protocol listener and a listener adapter. Listener
adapters are covered later in this document. For
more information about WCF, see
Windows Communication Foundation on MSDN.
Hypertext Transfer Protocol Stack (HTTP.sys)
The HTTP listener is part of the
networking subsystem of Windows operating systems,
and it is implemented as a kernel-mode device driver
called the HTTP protocol stack (HTTP.sys). HTTP.sys
listens for HTTP requests from the network, passes
the requests onto IIS for processing, and then
returns processed responses to client browsers.
In IIS 6.0, HTTP.sys replaced
Windows Sockets API (Winsock), which was a user-mode
component used by previous versions of IIS to
receive HTTP requests and send HTTP responses. IIS7
continues to rely on HTTP.sys for HTTP requests.
HTTP.sys provides the following
benefits:
- Kernel-mode caching.
Requests for cached responses are served
without switching to user mode.
- Kernel-mode request
queuing. Requests cause less overhead in
context switching because the kernel
forwards requests directly to the correct
worker process. If no worker process is
available to accept a request, the
kernel-mode request queue holds the request
until a worker process picks it up.
- Request pre-processing
and security filtering.
World Wide Web Publishing Service
(WWW service)
In IIS7, functionality that was
previously handled by the World Wide Web Publishing
Service (WWW Service) alone is now split between two
services: WWW Service and a new service, Windows
Process Activation Service (WAS). These two services
run as LocalSystem in the same Svchost.exe process,
and share the same binaries.
Note You
may also see the WWW Service referred to as W3SVC in
documentation.
How WWW Service works in IIS 6.0
In IIS 6.0, WWW Service manages
the following main areas in IIS:
- HTTP administration and
configuration
- Process management
- Performance monitoring
HTTP Administration and
Configuration
WWW Service reads configuration
information from the IIS metabase and uses that
information to configure and update the HTTP
listener, HTTP.sys. In addition, WWW service starts,
stops monitors, and manages worker processes that
process HTTP requests.
Performance Monitoring
WWW Service monitors performance
and provides performance counters for Web sites and
for the IIS cache.
Process Management
WWW Service manages application
pools and worker processes, such as starting,
stopping, and recycling worker processes.
Additionally, WWW Service monitors health of the
worker processes, and invokes rapid fail detection
to stop new processes from starting when several
worker processes fail in a configurable amount of
time.
How WWW Service works in IIS 7.0
In IIS7, WWW service no longer
manages worker processes. Instead, WWW Service is
the listener adapter for the HTTP listener, HTTP.sys.
As the listener adapter, WWW Service is primarily
responsible for configuring HTTP.sys, updating
HTTP.sys when configuration changes, and notifying
WAS when a request enters the request queue.
Additionally, WWW Service
continues to collect the counters for Web sites.
Because performance counters remain part of the WWW
Service, they are HTTP specific and do not apply to
WAS.
Windows Process Activation Service
(WAS)
In IIS7, Windows Process
Activation Service (WAS) manages application pool
configuration and worker processes instead of WWW
Service. This enables you to use the same
configuration and process model for HTTP and
non-HTTP sites.
Additionally, you can run WAS
without WWW Service if you do not need HTTP
functionality. For example, you can manage a Web
service through a WCF listener adapter, such as
NetTcpActivator, without running the WWW Service if
you do not need to listen for HTTP requests in
HTTP.sys. For information about WCF listener
adapters and hosting WCF applications in IIS7 by
using WAS, see
Hosting in WCF on MSDN.
Configuration Management in WAS
On startup, WAS reads certain
information from the ApplicationHost.config file,
and passes that information to listener adapters on
the server. Listener adapters are components that
establish communication between WAS and protocol
listeners, such as HTTP.sys. Once listener adapters
receive configuration information, they configure
their related protocol listeners and prepare the
listeners to listen for requests.
In the case of WCF, a listener
adapter includes the functionality of a protocol
listener. So, a WCF listener adapter, such as
NetTcpActivator, is configured based on information
from WAS. Once NetTcpActivator is configured, it
listens for requests that use the net.tcp protocol.
For more information about WCF listener adapters,
see
WAS Activation Architecture on MSDN.
The following list describes the
type of information that WAS reads from
configuration:
- Global configuration
information
- Protocol configuration
information for both HTTP and non-HTTP protocols
- Application pool
configuration, such as the process account
information
- Site configuration, such as
bindings and applications
- Application configuration,
such as the enabled protocols and the
application pools to which the applications
belong
If ApplicationHost.config changes,
WAS receives a notification and updates the listener
adapters with the new information.
Process Management
WAS manages application pools and
worker processes for both HTTP and non-HTTP
requests. When a protocol listener picks up a client
request, WAS determines if a worker process is
running or not. If an application pool already has a
worker process servicing requests, the listener
adapter passes the request onto the worker process
for processing. If there is no worker process in the
application pool, WAS will start a worker process so
that the listener adapter can pass the request to it
for processing.
Note:
Because WAS manages processes for
both HTTP and non-HTTP protocols, you can run
applications with different protocols in the same
application pool. For example, you can develop an
application, such as an XML service, and host it
over both HTTP and net.tcp.
IIS 7.0 Modules
IIS7
provides a new architecture that is different from
previous versions of IIS. Instead of keeping the
majority of functionality within the server itself,
IIS7 includes a Web server engine in which you can
add or remove components, called modules, depending
on your needs.
Modules are individual features
that the server uses to process requests. For
example, IIS uses authentication modules to
authenticate client credentials, and cache modules
to manage cache activity.
The new architecture provides the
following advantages over previous versions of IIS:
- You can control which modules
you want on the server.
- You can customize a server to
a specific role in your environment.
- You can use custom modules to
replace existing modules or introduce new
features.
The IIS7 architecture also
improves security and eases administration. By
removing unnecessary modules, you reduce the
server's attack surface and memory footprint, which
is the amount of memory that server worker processes
use on the machine. You also eliminate the need to
manage features that are unnecessary for your sites
and applications.
More info can be found on
IIS.NET
IIS
TechCenter
IIS
Downloads
IIS7 Community Forums
IIS7
Team
IIS7 Virtual Labs
IIS7
Videos/Podcasts on Channel 9