Beginner : Request Processing IIS
In this post, we would be going through HTTP request processing by IIS and components used by IIS for processing HTTP request. We would be referring to IIS 7 or later version for request processing.
Request processing for ASP.NET application
starts with client’s browser sending HTTP or HTTPS request for a page or controller
in case of ASP.NET MVC. When client’s browser request lands on Webserver, HTTP
listener HTTP.sys (Hypertext
Transfer Protocol Stack) receives request from network and transfer it IIS for
actual processing of a request and returns output of request to client’s
browser.
Post receiving request from network
HTTP.sys transfers this request to WAS
(Windows Process Activation Service). WAS is responsible for Managing
Application Pool and Worker processes(w3wp.exe). WAS first request for
information from Configuration Store. Configuration Store consist all Site,
Directory and Access related information stored in ApplicationHost.config and
Web.config files. WAS use Application Pool and site configuration information
to configure HTTP.sys.
With HTTP.sys configuration done; WAS
creates instance on Worker Process
(w3wp.exe). WAS transfer HTTP request to Worker Process for Processing. In
Worker Process, request passes through set of events such as Cache Resolution,
State Management, Authentication and log writing (IIS logs). Worker Process map
request with appropriate HTTPHandler, creates instance of handler and execute
it.
If HTTP request requires to execute Managed
Modules Worker Process creates AppDomain
to facilitate requirement of Manage Modules.
Above,
we discuss how IIS 7 is processing HTTP requests and providing response to
client’s browser. We also put light on some of the components used in processing
HTTP requests. Now I would like to fetch your attention towards Application
Pool Mode. Though Application Pool and its configuration is part of Website
hosting yet we would discuss implication of Application Pool Mode configuration
on HTTP request processing.
So, what is Application Pool….
Application Pool is a process by which IIS
separates or group different application/ websites. This is isolation level
maintained by IIS. Different applications or websites which has same setting or
configuration can be grouped under same Application Pool. There are two Managed
Pipeline Modes in IIS, Integrated
Application Pool and Classic
Application Pool.
If we configure Application Pool under
Classic Application Pool, request processing modules result in duplication of
some processes such as Authentication and Authorization. If we configure
Application Pool under Integrated Application Pool, request passes through
ordered events which calls for only required events from native as well as
manage modules. With Integrated Application Pool, we can remove duplicity of
IIS and ASP.NET events in request processing.
Comments
Post a Comment