Optimizing IIS 7 for Applications

Posted on October 28, 2011


Maximize a web application’s performance and availability in IIS 7

Here’s how: 

Application Pool

  • Put the app in it’s own Application Pool. This maximize’s resources available to the app.

  •  When you have created the Application Pool turn off the default Recycling Conditions so your app doesn’t restart at awkward times, losing cached memory and user sessions. Losing the cache causes performance to slow down and losing user sessions – if you’re reading this you know you don’t want to do that.
  • The webserver does need to be reset periodically. I do this by running IISRESET once a week, say Sunday morning @ 4:00am from the Task Scheduler.
  • Under the Application Pool’s Advanced Settings set the Idle Timeout to 0. This stops the app from recompiling (which slows it down).

The Web Application

  • Under HTTP Response Headers, enable HTTP compression and set Expire Web content anywhere from 1 to 10 days. Expire Web Content immediately if you’re doing an upgrade.
  • Enable HTTP compression (uses processor time so don’t do this if you see ‘%Processor Time on your server’s above 80% )
    1. Backup IIS metabase using Export Configuration Tool
      1. <server name> > Shared Configuration > Export Configuration…
    2. Static compression is enabled by default on the server under <server name> > IIS > Compression
    3. Dynamic Compression is added under Server Manager > Web Server(IIS) > Add Role Services > Check Dynamic Content Compression
    4. Check compression using Fiddler
  •  To reduce load from your application authenticating for graphics, etc. for the “client” directory:
    • Enable Anonymous Authentication
    • Disable Windows Authentication
Posted in: Technology