Monday, November 12, 2012

How AppPools, worker processes and AppDomains are related

In IIS, you are able to group several applications to a common application pool (AppPool).
Every AppPool can be assigned one (that's the default) or multiple (then this is called "web garden") worker processes.
A worker process (in case of IIS the name of the executable is w3wp.exe) is a memory region that is isolated from other worker processes. Like every windows process, it is being assigned a unique ID that can be checked e.g. in task manager.
Each of the applications assigned to the AppPool will live in a separate application domain (AppDomain) within each worker process.
An AppDomain is a submemory region isolated from other appdomains within the same process.
It stores Application, Cache, and in-process Session objects of the application and can be recycled e.g. by touching web.config .
The following figure illustrates the relationships:


No comments:

Post a Comment