I'm a bit confused about the effects of recycling application pool and application Domain. as i red an high voted article as follows: What exactly is Appdomain recycling
It says that appdomain
recycling is caused by any changes in settings or bin folder but as you can see below
Application pool is also recycled by configuration changes in a website that use this application pool, at this point three questions come to my mind
1.Firstly,is it reasonable to recycle application pool for any configuration changes made in website1 that also will affects website2 hence both of them use the same application pool?,Then what happens to isolation boundary between multiple applications that use the same application pool?
2.Secondly,What is exactly difference between AppPlool recycling and AppDoman Recyclyng?,Because both of them seems to do the same thing at the time of recycling?
3.Based on the picture above,Can we come to this conclusion that configuration changes will recycle AppDomain for sure but not necessarily AppPool ?
Your questions
Application config changes will not restart Application Pool. Configuration changes restart AppDomain and each App has a different AppDomain which takes care of boundary and isolation.
AppDomain Recycle is unloading and then reloading the AppDomain from w3wp process and doesn't restart the process. But Application Pool Recycle is unloading the corresponding w3wp process(es) of the Application Pool.
Yes, application config changes will recycle AppDomain, not the Application Pool.
I believe this summary (based on the links at bottom of the post) will help you to get a better understanding of Application Pool Recycle and AppDomain Recycle.
AppDomain Recycle
There are cases where an application domain must be unloaded from memory, reloaded, and the code re-jitted. This process does not terminate the worker process (w3wp.exe) and therefore does not affect other application domains assigned to the same pool.
Application Pool Recycle
An application pool recycle is when the all of the worker processes (w3wp.exe) for an application pool are unloaded and new instances are started to serve incoming requests.
AppDomain Recycle Circumstances
The following circumstances will cause a recycle of an application domain:
<compilation numRecompilesBeforeAppRestart=/>
setting in machine.config or web.config (default of 15)Application Pool Recycle Circumstances
Circumstances that can cause an application pool recycle to occur:
Configuring a recycling condition for the pool
○ Regular time interval (default of 1740 minutes)
○ Fixed number of requests
○ Specific time
○ Virtual memory usage
○ Private memory usage
More information