Microsoft Azure Cache is a family of distributed, in-memory, scalable solutions that enable you to build highly scalable and responsive applications by providing super-fast access to your data. But what do you choose?
This post provides you with an overview of the options you have when you are considering caching technologies.
Microsoft Azure Cache is available in the following offerings.
Microsoft offers a strong recommended choice for these caches. “Microsoft recommends all new developments use Azure Redis Cache.”
That said, this post discusses each to give you a quick overview. This article also introduces you to one other cache.
Here’s the short answer:
- Use Azure Redis Cache when you want to cache string, hashes, .NET classes, data.
- Use CDN when you want to cache audio, video, applications, images, and other files.
In following posts, Introduction to Azure Redis Cache and Introduction to Azure Content Delivery Network (CDN), you learn more about these technologies specifically.
Azure Redis Cache helps your application become more responsive even as user load increases and leverages the low latency, high-throughput capabilities of the Redis engine. This separate distributed cache layer allows your data tier to scale independently for more efficient use of compute resources in your application layer.
Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. Redis supports a set of atomic operations on these data types.
Microsoft Azure Redis Cache is based on this cache and store. It gives you access to a secure, dedicated Redis cache, managed by Microsoft, providing the best of both worlds: the rich features and ecosystem of Redis, and reliable hosting and monitoring by Microsoft.
Azure Managed Cache Service provides a way for you to perform caching that helps you build fast, scalable applications in Microsoft Azure through a secure, dedicated cache. A secure, dedicated cache is created for you in the region of your choice and you have total control over the cache, guaranteeing isolation of your business critical data.
However, Microsoft recommends that you migrate to Redis Cache intsead.
But in case, you want to know, you can see a step-by-step walkthrough at How to use Azure Managed Cache Service. For downloadable examples, see Azure Managed Cache Service Samples.
Managed Cache Service is available in the following three offerings.
- Basic – Cache in sizes from 128MB to 1GB in 128MB increments, with one default named cache
- Standard – Cache in sizes from 1GB to 10GB in 1GB increments, with support for notifications, high availability, and up to ten named caches
- Premium – Cache in sizes from 5GB to 150GB in 5GB increments, with support for notifications, high availability, and up to ten named caches
In-Role Cache allows you to host caching within your Azure roles. This cache can be used by any roles within the same cloud service deployment. This means that all of the worker role’s available memory is used for the caching and operating overhead. In a co-located topology, you use a percentage of available memory on application roles for caching. For example, you could assign 20% of the physical memory for caching on each web role instance. In both cases, you only pay for the Compute services required for the running role instances. For more information, see In-Role Cache FAQ (Azure Cache).
If you are self-hosting cache using In-Role Cache, you can continue to do so as well. Because In-Role Cache is a self-hosted software component and not a Microsoft hosted service, it does not offer any SLA. In-Role Cache users can choose to migrate to Azure Redis Cache to leverage its rich feature set and get an SLA.
Azure Content Delivery Network (CDN)
Azure Content Delivery Network (CDN) is designed to send audio, video, applications, images, and other files faster and more reliably to customers using servers that are closest to each user.
CDN caches publicly available objects at strategically placed locations to provide maximum bandwidth for delivering content to users.
For more information about getting started with Azure Redis Cache, see How to Use Azure Redis Cache.