Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Application Pool in IIS and Asp.Net? [duplicate]

Tags:

How is application pool implemented in IIS?

  1. Is each application pool equivalent to a .Net AppDomain?
  2. Or it is a equivalent to a .Net process?
  3. How is Application pool related to IIS w3wp.exe?
like image 956
Amitabh Avatar asked Apr 17 '10 18:04

Amitabh


People also ask

What is application Pooling in IIS?

Application pools in Internet Information Services (IIS) is a mechanism designed to comprise a group of web applications corresponding to one or more worker processes (w3wp.exe) sharing a common configuration.

Why would you need more than one application pool in IIS?

When using multiple application pools, you can use different Windows accounts on each application pool. This can not only enhance security, but it can also help when trying to track down performance issues. Pros: Your sites will be isolated from each other.

What causes an application pool in IIS to recycle?

Cause: Application pools are configured to recycle when memory limits are exceeded. Resolution: Change the application pool recycling settings in Internet Information Services (IIS).

What is the default application pool in IIS?

By default, IIS 7.0 provides you with a single application pool called DefaultAppPool.


2 Answers

1 . Is each application pool equivalent to a .Net AppDomain?

No, an application pool may have several AppDomains. Each AppDomain represents a single running ASP.NET Application. Many ASP.NET Applications may belong to a single Application Pool.

2 . Or it is a equivalent to a .Net process?

Not quite. See below.

3 . How is Application pool related to IIS w3wp.exe?

An application pool represents a limited number of worker processes that may host a potentially larger number of applications. This is similar to how a SQL Connection Pool shares a limited number of connections among an arbitrary number of requests.

By default, an Application Pool gets one Worker Process (w3wp.exe), and it's usually best to leave this setting alone unless you know what you're doing. Still, an Application Pool can be configured to use any number of processes.

The Worker Process is actually the resource that's being pooled here, not the AppDomain. There will always be the same number of AppDomains as there are ASP.NET Applications (unless one is in the middle of shutting down, or an application creates its own AppDomains), but the number of Worker Processes is independent; an Application Pool gives you a specific number of Worker Processes to handle requests for a specific number of AppDomains.

A setting of 1 (the default) for the number of worker processes in an App Pool means that all Applications/AppDomains in the pool share the same worker process.

like image 103
Aaronaught Avatar answered Jan 13 '23 03:01

Aaronaught


It's an oversimplification to say it this way but the best way to think about it is that the AppPool is a pool of AppDomains. All of these AppDomains run within a single worker process (w3wp.exe).

like image 20
Andrew Hare Avatar answered Jan 13 '23 04:01

Andrew Hare