title: Application Pool Start Mode: OnDemand vs AlwaysRunning, which the best?
body: <p>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 <a href="https://www.red-gate.com/simple-talk/blogs/speeding-up-your-application-with-the-iis-auto-start-feature/" rel="nofollow noreferrer">this</a> great article.</p>
  <p>Below some doubts I have and I would like to understand:</p>
  <ol>
  <li><p>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?</p>
  </li>
  <li><p>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)?</p>
  </li>
  <li><p>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).</p>
  </li>
  </ol>