Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Summary:

I have an ASP.NET MVC website in IIS named 'Website' using an AppPool named 'WebsiteAppPool'. WebsiteAppPool is configured to allow up to 4 Worker Processes, in effect creating a 'Web Garden'. The Website is also configured, via web.config, to enable OutputCaching using CacheProfiles.

<caching>
  <outputCacheSettings>
    <outputCacheProfiles>
      <clear />
      <add name="ControllerNameActionName" duration="43200" varyByParam="*" />
    </outputCacheProfiles>
  </outputCacheSettings>
</caching>

My question is -

Will the AppPool's worker processes share the output cache or will each worker process have the Output Cache, therefore creating 4 cached copies across the AppPool.

Note:

My main concern is that this will debunk the benefits of having cached output and I would be better off having one WorkerProcess serving up the cached output rather than the 4.

share|improve this question
    
You asked this question on SO: stackoverflow.com/questions/1894212/… –  GregD Dec 12 '09 at 18:15
    
I guess I don't know if there are more people on this site or the other...it seemed more appropriate on this site, but I think there are more people on SO who also might have an answer. So I took my chances by asking it on both. –  Ryan Montgomery Dec 12 '09 at 21:59
add comment

1 Answer

up vote 1 down vote accepted

From MSDN:

Because Web gardens enable the use of multiple processes, each process will have its own copy of application state, in-process session state, caches, and static data. Web gardens should not be used for all applications, especially if they need to maintain state. Be sure to benchmark the performance of the application before deciding whether Web garden mode is appropriate.

When using a Web garden, it is important to understand how session state and round robin works. It is also important to consider of how other application pool settings affect the application

Web gardens are especially screwy if you're doing in-process session state (which you hopefully aren't anyway). In my experience, I find that web gardens are rarely the benefit that people think they are.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.