Caching choices

In a meeting with a customer this week the question of which caching capability on Azure to use came up again.

As I’m writing this Microsoft Azure offers three caching options, here’s the extract from the Azure web page –

Azure Cache is a family of distributed, in-memory, scalable solutions that enables you to build highly scalable and responsive applications by providing you super-fast access to your data. We offer the following types of Azure Cache:

  • Azure Redis Cache: Built on the open source Redis cache. This is a dedicated service, currently in Preview.
  • Managed Cache Service: Built on App Fabric Cache. This is a dedicated service, currently in General Availability.
  • In-Role Cache: Built on App Fabric Cache. This is a self-hosted cache, available via the Azure SDK.

As you can see from the description above, first and foremost the decision is between two technologies – Redis and AppFabric caching. Then, as things stand currently, for AppFabric there’s another choice of deployment model  – managed or in-role. (I suspect that one can create an in-role Redis cache with not too much effort, but this is not currently an out-of-the-box feature and so I’ll ignore it).

My experience with AppFabric Caching is a good one – I find it performs well, feature rich and mature for the enterprise. I have not had the chance to work with Redis but the feedback that I am getting from colleagues and customers is also very good, it seems it performs slightly better than AppFabric in many (but not all) scenarios, and it has some interesting features beyond what AppFabric provides.

I won’t go into a detailed comparison between the two (although unfortunately I can’t find a recent one either) but that feedback leads me to think that the first point to consider is your application requirements from its caching platform and whether that leads towards one solution over another.

All things being equal, at this point in time, I find that AppFabric provides a bit more flexibility compared to Redis in the sense that I can use it as a managed service on Azure, I can create a private cache in the cloud using in-role caching and I can run it locally in my data centre with a reasonably straight forwarded deployed.

If this flexibility is important to you than, right now, AppFabric might be the better choice.

And finally – if you have settled on using AppFabric on Azure – should you use the managed cache service or in-role service?

My starting position is always to prefer the as-a-service option. I have little if anything to manage, I don’t need to worry about the impact of updates to my roles or to balance resources between my roles and the cache.

So – when do customers prefer in-role caching? in my experience two arguments come up – 1: when they are not happy with a cache service accessible via the internet. using In-role caching I have more control over who has access to my cluster.  2: when they want to save the cost and believe they have enough capacity to balance role memory and in-role caching

About Yossi Dahan
I work as a cloud solutions architect in the Azure team at Microsoft UK. I spend my days working with customers helping be successful in the cloud with Microsoft Azure.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: