Configure a Running Azure In-Role Cache Cluster

Important

Microsoft recommends all new developments use Azure Redis Cache. For current documentation and guidance on choosing an Azure Cache offering, see Which Azure Cache offering is right for me?

This topic provides guidance on how to configure Microsoft Azure Cache hosted on roles in a deployed cloud service. Some changes result in the recreation of the cache and a short down-time for that cache. Other changes are not supported. Please review the information in this topic carefully to understand the implications.

Configuration Process

caching is configured by several configuration settings. To make caching changes to a deployed cloud service, use the to change these settings. The following steps describe this process.

  1. In the , select Cloud Services.

  2. Select your cloud service, and then select Production or Staging.

  3. Click the Configure link, and scroll to view the settings for the role that hosts caching.

  4. Use the Settings section to make modifications to the Caching settings. For more information, see the remaining sections in this topic.

Although all of the settings discussed in this topic are in the Configure tab, there is also one important configuration setting in the Scale tab. You can grow or shrink your cache size by adding or removing role instances for the role that hosts caching.

Important

It is very important that when you scale down the number of role instances that you do not reduce the count by more than three. After that change completes, you can continue to reduce instances in increments of three or less.

Microsoft.WindowsAzure.Plugins.Caching.NamedCaches

You can add and delete named caches by manually changing this section. Deleting a named cache can take several minutes to perform. For more information about how to construct the JSON syntax and the possible settings, see In-Role Cache Role Configuration Settings (ServiceConfiguration.cscfg). Not all settings should be changed on an existing cache. The following table provides guidance on specific named cache settings.

Setting Supportability Impact

name

Not supported at runtime

Attempting to change the name of a cache has the effect of removing the existing cache and creating new one. Also, this scenario requires the code to be aware of the absence of the first cache and the addition of the new cache.

eviction

Supported

A change to this setting results in the named cache being deleted and recreated. During this process the cache is unavailable for several minutes.

expiration

Supported

A change to this setting results in the named cache being deleted and recreated. During this process the cache is unavailable for several minutes.

serverNotification

Supported

A change to this setting results in the named cache being deleted and recreated. During this process the cache is unavailable for several minutes.

secondaries

Not supported at runtime

Changes to this setting at runtime can negatively impact performance. Changes to this setting require re-deployment.

defaultTTL

Supported

A change to this setting results in the named cache being deleted and recreated. During this process the cache is unavailable for several minutes.

Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel

Changes to this setting are supported at runtime. For more information, see Azure In-Role Cache Troubleshooting and Diagnostics.

Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage

It is not supported to change this setting at runtime. You must redeploy the cloud service with the changed setting.

Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString

It is not supported to change this setting at runtime. You must redeploy the cloud service with the changed setting.

Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel

Changes to this setting are supported at runtime. For more information, see Azure In-Role Cache Troubleshooting and Diagnostics. Note that this configuration setting is specific to the roles (cache clients) that use caching.

See Also

Concepts

In-Role Cache Role Configuration Settings (ServiceConfiguration.cscfg)
Azure In-Role Cache Troubleshooting and Diagnostics