I have always been using OnDemand start mode for my application pools but I have recently heard about AlwaysRunning mode which allows an ASP.NET application deployed to IIS to be available immediately after deployment. It seems like enabling this feature causes IIS to prime an application as soon as it is deployed removing the warm-up time often required of “cold hits” to a website. This is explained in this great article.
Below some doubts I have and I would like to understand:
Using AlwaysRunning feature, what happens when recycling the application pool? memory used is removed and freed? Worker processes are terminated and started again or they continue available in memory and their memory used is not removed and freed?
What are the advantages and disadvantges for OnDemand and AlwaysRunning? Which is better for a single worker process and which better for web garden (multiple worker processes)?
Also, could someone explain how web site behaves when using AlwaysRunnig in combination with process idle timeout and idle time-out action and recycling? and the same for OnDemand. I would like to be clear about how all these pieces intervene together under these scenarios (AlwaysRunning and OnDemand).