Site Performance and Caching

Jul 28, 2010 at 5:01 PM

Every time a new user hits the website, it seems to be caching the site in IIS. As a result, the site takes 30+ seconds to load after an iisreset (expected) but can also take that amount of time when a user logs in. This does not seem to make any sense. Any thoughts?

Jul 28, 2010 at 5:18 PM

The site caches differently for anonymous versus authenticated content.  There will be an initial delay for the first time a user logs in, although it will be shorter than for the initial startup.  I think 30 seconds is a long time and I would look at some other areas in your architecture to find the bottlenecks.

With regards to this making sense, consider cases - we have to cache them per customer so that there is no bleed from one user to another and the security of the case data remains tight.  That is why we cache per-user, and in caching per-user, a new user logging in means we have a cache miss and have to go back to CRM for data.  The free portal doesn't have content security, but the commercial version from Adxstudio does.  They are both built upon the same portal framework and the caching of things like web pages is important to have on a per-user basis when content security is enabled.

Another setting you should consider is that the default app pool setting tells IIS to shut down / recycle the app pool if the site is inactive for 20 minutes.  This means that if there are no visitors to your site in 20 minutes, the site shuts down and you suffer from a long startup.  I recommend that you adjust this timer to a very high value (there really is no advantage to shutting down the process), and/or to add site monitoring scripts to your site.  The monitoring scripts will alert you when the site is not functioning, but the side effect is that IIS will keep the process alive...

Shan McArthur