Orchard on multi IIS configuration with AppFabric.

Topics: Installing Orchard
Sep 11, 2014 at 10:17 AM
Edited Sep 11, 2014 at 10:26 AM
Hello guys,

I am installing orchard 1.7.3 on multi IIS environment with AppFabric.
My question is: which orchard functionality from 'vanilla' distribution should be replaced (or added) to work without issues on multi IIS environment with appfabric?

I know that following implementations shall be replaced:
  • default Media.IStorageProvider
  • default IOutputCacheStorageProvider
What about event distributions/application settings cache (ICacheManger) - should it be replaced ?
What else shall be replaced/added?

And one more question about Business Data Caching Using Orchard.Caching (http://docs.orchardproject.net/Documentation/Caching ):
Because of the limitations of the ICacheManager in terms of distributed caching, another set of modules was necessary to cache business data which has to be shared across servers. This module can set and get entries by a key only, and invalidate by name or time. This is the only requirement for storage providers in this module, which allows its usage on farms.
This is implemented in:
https://bitbucket.org/sebastienros/orchard.caching
https://bitbucket.org/sebastienros/orchard.caching.memcached
Is sebastienros/orchard.caching implementation can be shared across servers?
I am asking because this implementations used HttpRuntime.Cache and based on Forum ASP.NET this cache is not distributed.
Developer
Sep 11, 2014 at 9:08 PM
Unfortunately there is a lot to do to achieve this. You indeed need a distributed provider for Orchard.Caching. For CacheManager and signals you can use Distributed Events. Full support for this is built into the Hosting Suite.
Developer
Sep 12, 2014 at 12:03 AM
rafalt2 wrote:
Is sebastienros/orchard.caching implementation can be shared across servers?
I am asking because this implementations used HttpRuntime.Cache and based on Forum ASP.NET this cache is not distributed.
Yes, the default implementation uses HttpRuntime.Cache, but if you enable Orchard.Caching.Memcached, another implementation will take over and provide a distributed cache using Memcached.
Sep 12, 2014 at 10:58 AM
Edited Sep 12, 2014 at 11:41 AM
Thank you for reply!

Lets summarize:
Following implementations are needed for orchard 1.7.3 installed on multi IIS:
  • IMediaStorageProvider
  • IOutputCacheStorageProvider
  • ICacheManager
  • signals
  • something else ?
What will happen if I use default implementations for IOutputCacheStorageProvider, ICacheManager and signals on multi IIS environment?
What kind of problems may appear (other than performance issues)? Should I expect problems like mixed responses between clients? Any other?


Zoltan,
do you have version of Distributed Events module compatable with orchar 1.7.3?
Developer
Sep 12, 2014 at 11:37 AM
Sorry, no 1.7.3 compatible version. But AFAI remember it should be fairly simple to back-port it.
Developer
Sep 13, 2014 at 4:12 AM
rafalt2 wrote:
What will happen if I use default implementations for IOutputCacheStorageProvider, ICacheManager and signals on multi IIS environment?
What kind of problems may appear (other than performance issues)? Should I expect problems like mixed responses between clients? Any other?
Nothing bad will happen, but keep in mind that if you change something on one node (and that something is being cached), other nodes won't know about that change (since they get that something from their local cache). What you might start seeing is that as you change content, those changes won't immediately appear, depending on what node the load balancer selects to process the request.

Note that some things in Orchard use ICacheManager, which doesn't have any distributed implementations (in contrast to ICacheService, for which a memcached implementation exists in some other module).
This means that if you for example change a Content Type (content type definitions are cached using ICacheManager), that change won't be seen on other nodes until the application pool on those nodes is recycled.

Check out this thread for more details (specifically Sebastien's first response): https://orchard.codeplex.com/discussions/436874