Preloading your application pools (0)Add to My Brief

Peter Nguyen | 29/08/2012

There has always been one thing that frustrated me the most about compiled code – the time it takes for your web application to start up for the first time in IIS. The .net compiler kicks in, the application pool spins up and your code is being generated behind the scenes. This can take minutes, and people generally don’t want to wait minutes for their website to start up.

Coming from an open source/non-compiled PHP/Linux development environment, this has always been one of my major concerns. In fact, even Microsoft’s own Sharepoint takes up to 5 minutes to spin up after an IIS reset.

Something that I’ve recently discovered, and is in fact built in to the upcoming IIS 8.0, is the ability to keep your application pools running in standby and warm. For sites with low traffic, and the application pools automatically recycling after 20 minutes of inactivity, this could speed up the overall performance of the site dramatically. No more “it’ll be fast once it gets going” excuses.

What you do is you is:

1.      Install the Application Initialization module for IIS7.5 (available in the Web Platform Installer - http://www.iis.net/download/ApplicationInitialization)

2.      Modify the server’s applicationHost.config by looking for your application pool and adding startMode=”AlwaysRunning”, for example:

startMode="AlwaysRunning" managedRuntimeVersion="v4.0" />

3.      Look for your site in the element and add preloadEnabled=”true”, for example:

preloadEnabled="true" applicationPool=".NET v4.5">

4.      Restart IIS, wait a few minutes, and voila! Your application is instantly faster due to the pre-loading of your application pool and website.

For further documentation – you can visit: http://learn.iis.net/page.aspx/1089/iis-80-application-initialization/#TOC301259898

tags: Web Development

Interested in learning more?

Wiliam is a leading supplier of web solutions and can provide expert advice to assist your business or organisation online.

Make enquiry   Request quotation

Comments

Share this page

Print this page Email this page to a friend Copy the URL of this page

No Brief added yet.

My Brief results-driven approach emphasises a commitment to our clients needs through strategic analysis and best-practice.

Add to My Brief

Click on this icon to save item into My Brief. Retrieve, email and print

Drag & Drop

Drag & drop any iten with this icon into My Brief. Retrieve, email and print

Search Blogs