0

I'm trying to use the Azure Cache Preview. It works most of the time, but suddenly I'm getting a 503 Service Unavailable error.

This question is 2 parts - First off, is this sudden 503 a transient thing or can something in the code cause this? My code is configured exactly like this article says to.

Second, is there a good way to fallback to a different caching strategy if this happens at runtime? I don't want users to be blocked from the site because the caching layer is down. I've got my cache implementation behind an interface whose implementation is delivered by ninject.

mccow002
  • 6,754
  • 3
  • 26
  • 36

1 Answers1

0

The article linked is the bare minimum 101 level on how to use Azure caching. For anything of scale, I would use a framework to handle transient errors such as Microsoft's Transient Fault Handling Application Block (Topaz) http://msdn.microsoft.com/en-us/library/dn440719%28v=pandp.60%29.aspx, and abstracting it as you mentioned is a good plan. The provisions in that library that are simply made to handle transient faults.

See the namespace: Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Cache (quite a mouthful)

As their docs state, using transient fault handling doesn't free you from having to do standard exception handling. If the cache server is down, your users should see the same thing (if not slightly slower). If you wish to implement a different caching strategy on failure, you are free to decide how to do so.

Phil
  • 147
  • 1
  • 2
  • 10