3
votes

I have a small Orchard website that I'm hosting on Windows Azure. This website is currently configured to use a FREE web site instance. I've noticed that the first time the site is accessed after a 20-30 minute period, it takes a while (>5 seconds) to load. After that initial load, I can revisit the site, and its fast. I suspect that the app pool is recycling fairly often as its a FREE Azure Web Site instance.

I need this site to load as fast as possible. I'm not opposed to using a different Azure option. I'm just not sure what I should be using.

1) Is there a way in my Orchard site's web.config file to set how often the app pool is recycled? I really need this site to be quick.

2) If I use a "SHARED" Web Site instance, will this get me past the recycling issue?

3) Or, do I need a "RESERVED" Web site instance.

My main goal here is to cost-effectively meet my goal of loading my web site quickly after it hasn't been accessed in a while. I'm just not sure what I can/should do.

Thank you!

2

2 Answers

0
votes

I use a combination of the following for performance issues:

  1. I enable Keep Alive module
  2. I enable Warmup module and in Performance settings add my most visited pages
  3. I manually set machine key inside web.config so that sessions last regardless of recycling - this could be an issue if there's not enough memory allocated for the web site inside the IIS

These steps are not related specifically to Azure, but rather to any kind of hosting. Especially when using Azure shared web site instances since they're nothing more than a shared hosting (unlike Azure cloud services)..

0
votes

Azure web role can easily be made to be fast and avoid the appPool recycle issues, so consider that your plan B after trying all options with Azure websites.

I haven't tried with Azure websites, so it may or may not be possible there. Info is vague as to whether or not you can configure the idle timeout setting for a reserved instance. One thing you can try is to use the warm-up feature (dashboard -> performance). This should periodically load some pages, which would prevent idle timeout of the appPool. You might also try external services like pingdom.com or something similar that would periodically ping your site to prevent it from recycling.

If you end up switching to web roles, you will definitely be able to do this. The latest Orchard builds (v1.6+) set the appPool idle timeout to 0 (never timeout) by default. You will in general get a lot more control over performance and other configuration if you use web role rather than azure websites. The main drawback with this choice is you lose some of the deployment options, and deployments take a lot longer (they are still easy, they just take a while).