Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between an application domain and an application pool?

What is difference between application domain and application pool?

I have read many articles regarding these two terminology. but still unable to get proper understanding about them.

Please elaborate it with simple description.

Thanks

like image 954
Amit Soni Avatar asked Dec 13 '11 08:12

Amit Soni


People also ask

What is app pool and app domain?

Application Domain is an ASP.NET concept which provides isolation for each ASP.NET application. Application Pool is an IIS concept which also provides isolation but at the process level. Application Domain is available only for ASP.NET applications.

What is application pool?

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.

What is meant by application domain?

An application domain is the segment of reality for which a software system is developed. It is the background or starting point for the actual-state analysis and the creation of a domain model. An application domain can be an organization, a department within an organization, or a single workplace.

What is IIS app domain?

An AppDomain is a .NET term. ( In IIS7, AppDomains play a larger role within IIS, but for the most part it's an ASP.NET term) The worker process is used to process the request of the web application.


1 Answers

IIS process is w3wp; Every application pool in IIS use it's own process; AppPool1 uses process 3784, AppPool2 uses process 5044 Different applications in Asp.net will use different AppDomain;

AppTest1 and AppTest2 are in different AppDomain, but in the same process.

What's the point to use them?

Application pool and AppDomain , both of them can provide isolations, but use different approaches. Application pool use the process to isolate the applications which works without .NET. But AppDomain is another isolation methods provided by .NET. If your server host thousands of web sites, you wont use thousands of the application pool to isolate the web sites, just because, too many processes running will kill the os. However, sometime you need application pool. One of the advantages for application pool is that you can config the identity for application pool. Also you have more flexible options to recycle the application pool. At least right now, IIS didn't provide explicit options to recycle the appdomain.

An application pool is a group of one or more URLs of different Web applications and Web sites. Any Web directory or virtual directory can be assigned to an application pool. Every application within an application pool shares the same worker process executable, W3wp.exe, the worker process that services one application pool is separated from the worker process that services another [Like starting MS Word and opening many word documents]. Each separate worker process provides a process boundary so that when an application is assigned to one application pool, problems in other application pools do not affect the application. This ensures that if a worker process fails, it does not affect the applications running in other application pools. [i.e] for Eg., If word document is having issue it should not logically affect your Excel Sheet isn’t it. application domain is a mechanism (similar to a process in an operating system) used to isolate executed software applications from one another so that they do not affect each other. [i.e] opening of MS WORD doesn’t affect MS EXCEL you can open and close both the applications any time since there is no dependency between the applications. Each application domain has its own virtual address space which scopes the resources for the application domain using that address space.

Thanks to this link

like image 136
Amit Soni Avatar answered Oct 30 '22 17:10

Amit Soni