1

What is the best way to handle a complete AppFabric meltdown, ie ALL cache-hosts go down?

At the moment, my cache client access methods (ie put/get) are wrapped up in a try catch block with a null return on failure. Is this the right way to handle things?

What is the best way to handle DataCacheFactory initialisation failures? For example, if the cache cluster is down the cache client will timeout and this will occur for all subsequent calls until the cluster is restored. To get round this I have implemented a boolean that will cause the application to avoid all caching until we get a successful DataCacheFactory instance. Does this sound like a reasonable solution?

AQRH
  • 11
  • 1
  • Please add in your tags the language/framework you use. – AFract Oct 27 '14 at 16:50
  • One other option is to use a fallback cache if the cluster is unavailable. Whether to do this depends on what data you have cached and how you use it, but we found that in a high performance app the time spent checking for the cluster and failing to connect was impacting performance, so a MemoryCache is used while the cluster is unavailable. If that sounds like something you would want to try then I can post some code - bear in mind though that in a clustered web farm there is no way to invalidate an item on another host. – stuartd Oct 28 '14 at 13:45
  • @stuartd What you describe sounds similar to what we have settled with. If the DataCacheFactory fails to initialise the application uses a local cache until we establish a successful connection (checking every 5 minutes). Thank you for your reply. – AQRH Oct 28 '14 at 14:05

0 Answers0