1 out of 2 rated this helpful - Rate this topic

Windows Azure Caching FAQ

What is Windows Azure Caching?

Windows Azure Caching is a distributed, in-memory cache that you can use to accelerate the performance and scale of your cloud applications built on Windows Azure and SQL Database. Caching is often used to keep frequently-queried data in-memory close to the application itself, which both reduces overhead on the database tier and also eliminates unnecessary network latency.

ASP.NET developers can use Caching without code changes, as pre-built session state and output caching providers enable you to activate with simple configuration changes. Caching capabilities are also directly available using a simple API for even more flexible and customized application use. At runtime, Caching transparently distributes ASP.NET session/output cache data or .NET Framework objects stored in the cache across the elastic, scale-out infrastructure.

For more information on Caching, see About Windows Azure Caching.

What is new with Windows Azure Caching?

Windows Azure Caching introduces a new ability to host Caching within your Windows Azure roles. The cache is distributed across the instances of the role that hosts the cache. This is a change from Windows Azure Shared Caching. The main difference from Shared Caching is that role-based Caching is private to your hosted service. With Shared Caching, Caching is offered as a multitenant service. As a result, role-based Caching does not have the quotas that a shared service must have. The size of the cache is determined by several variables. First, the size is dependent on the number of running instances of the role that has Caching enabled. It is also dependent on the size of those virtual machines and the percentage of memory that is devoted to Caching on the role. Caching on Windows Azure roles supports additional features, such as high availability, regions, notifications, and multiple named caches. Because it is part of your cloud service, Caching on roles should also have improved performance over Shared Caching.

For more information on role-based Caching, see the following resources.

Where can I download Caching?

The Caching binaries are part of the latest Windows Azure SDK. Download and install the latest Windows Azure SDK and Visual Studio tools to obtain everything necessary for Caching.

Is role-based Caching supported in production at this time?

Yes. Windows Azure Caching was released with the Fall 2012 release of the Windows Azure SDK.

Why can't I create a cache through the new Management Portal?

Role-based Caching is not provisioned through the Windows Azure (Preview) Management Portal. Instead, Caching is configured as part of your cloud service deployment. If you need to create or manage caches that use Shared Caching, you must use the old Windows Azure Management Portal.

What is the provisioning model for role-based Caching?

Role-based Caching is provisioned as a part of your cloud service deployment. Caching is enabled on a role that provides Caching to all of the roles in the same deployment. You can enable Caching through the Caching tab of the role properties in Visual Studio. For more information, see Configure Caching on Windows Azure Roles.

How am I billed for role-based Caching?

There is no premium associated with role-based Caching. Instead, you are billed using standard pricing for compute time for Windows Azure role instances. For example, if you had three web role instances running your ASP.NET web site, it is possible that you could use the extra memory on those instances for Caching. In this example, there would not be additional charges for using Caching on the existing web role. However, you might find that you need to add an additional web role instance or a dedicated Caching role. In this case, you would be charged for the additional running role instances that you require for Caching.

How can I increase or decrease the cache size?

With role-based Caching, a percentage of memory from each role instance contributes the total memory available for Caching. There are two ways to change the cache size. First, you can change the percentage of memory reserved for Caching on the role. Second, you can increase or decrease the amount of memory available for Caching by increasing or decreasing the number of instances of the role that has Caching enabled. The Windows Azure (Preview) Management Portal supports the ability to make this change to a running cloud service. The actual change in memory is dependent on the virtual machine size for the target role and the percentage of memory allocated for Caching.

What kind of data can I store in the cache?

You can store any kind of data in the cache. The only requirement is that the data is serializable. This includes but is not limited to:

  • Common Language Runtime (CLR) objects

  • Rows

  • XML

  • Binary data

You can programmatically interact with the cache using the simple .NET Framework API. You can also configure the cache as a provider for ASP.NET session state and page output.

What is the difference between co-located and dedicated Caching topologies?

There are two main ways a role can host Caching: co-located and dedicated. In the co-located topology, the role that hosts Caching also hosts other web role or worker role functionality. The memory and resources of the role are shared between caching and non-caching application code and services. In the dedicated topology, which is supported for worker roles, the worker role only hosts caching. These Caching topologies differ primarily in the percentage of memory that is dedicated to Caching. For more information, see the topics on co-located Caching roles and dedicated Caching roles.

Does role-based Caching have any usage quotas?

There are no defined usage quotas for role-based Caching. However, the amount of memory and performance of the cache is constrained by physical resources. For example, Caching uses physical memory only. It is not possible to use more physical memory than the combined available memory on the virtual machine instances. It is also possible to have constraints for other physical resources. For example, if a worker role uses a high amount of processing time, adding Caching to that role could result in poor Caching performance.

By using Windows Azure roles for Caching, you have the control and flexibility to configure Caching in the best way for your application with no predefined quotas. To make the best choices, see Capacity Planning Considerations for Windows Azure Caching.

See Also


Build Date:

2012-10-26
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter