Content deleted Content added
m Fixed a citation error in co-located section |
m Added citations to the Examples section |
||
Line 1:
{{Userspace draft}}
'''Windows Azure Caching''' is an in-memory, [[Distributed cache|distributed caching]] feature designed for [[Windows Azure]] applications<ref name=CachingMain>{{cite web|title=Caching in Windows Azure|url=http://msdn.microsoft.com/en-us/library/gg278356.aspx|work=MSDN Library|publisher=Microsoft|accessdate=12 February 2013}}</ref>. Caching is currently available as a part of the Windows Azure SDK.
<ref name="AzureMain">{{cite web|url=http://msdn.microsoft.com/en-us/library/dd163896.aspx|work=MSDN Library|publisher=Microsoft|title=Windows Azure Overview and Feature Areas|accessdate=12 February 2013}}</ref>
==Architecture==
Windows Azure Caching allows a cloud service to host Caching on a Windows Azure role<ref name=CachingMain/>. The cache is distributed across all running instances of that role. Therefore, the amount of available memory in the cache is determined by the number of running instances of the role that hosts Caching and the amount of physical memory reserved for Caching on each instance<ref name=CachingCapacityPlanning>{{cite web|title=Capacity Planning Considerations for Windows Azure Caching|url=http://msdn.microsoft.com/en-us/library/hh914129.aspx|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref>.
There are two deployment topologies for Caching:
* ''Dedicated''<ref name=CachingDedicated>{{cite web|title=Windows Azure Caching on Dedicated Roles|url=http://msdn.microsoft.com/en-us/library/hh914140.aspx|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref>
* ''Co-located''<ref name=CachingColocated>{{cite web|title=Windows Azure Caching on Existing Roles|url=http://msdn.microsoft.com/en-us/library/hh914128.aspx|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref>
===Dedicated Topology===
Line 17:
[[File:Windows Azure Caching (Dedicated).jpg|Type=frame|Location=none|300px|Represents a running Windows Azure cloud service that uses Caching with a dedicated topology.]]
A dedicated topology has the advantage of scaling the caching tier independently of any other role in the cloud service<ref name=CachingCacheCluster>{{cite web|title=About Windows Azure Caching, Cache Cluster|url=http://msdn.microsoft.com/en-us/library/hh914161.aspx#Concept_CacheClusters|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref>. For the best Caching performance, a dedicated topology is recommended because the role instances do not share their resources with other application code and services<ref name=CachingDedicated/>.
===Co-located Topology===
Line 32:
===Configuration Example===
In [[Visual_Studio|Visual Studio]], Caching is configured in the Caching tab of the properties of the role that hosts Caching<ref name=CachingHowToGuide>{{cite web|title=How to Use Windows Azure Caching|url=http://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/|work=Windows Azure Website|publisher=Microsoft|accessdate=13 February 2013}}</ref>. This makes underlying changes to the ServiceConfiguration.cscfg file<ref name=CachingCsCfg>{{cite web|title=Windows Azure Caching Role Configuration Settings (ServiceConfiguration.cscfg)|url=http://msdn.microsoft.com/en-us/library/jj658975.aspx|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref>. These settings determine the topology used (dedicated or co-located) and the number of named caches<ref name=NamedCaches>{{cite web|title=About Windows Azure Caching, Named Caches|url=http://msdn.microsoft.com/en-us/library/hh914161.aspx#Concept_NamedCaches|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref> and their settings.
Other roles must be configured to use Caching<ref name=CacheClientConfig>{{cite web|title=Getting Started with Development for Windows Azure Caching, Configure the Clients|url=http://msdn.microsoft.com/en-us/library/hh914150.aspx|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref>. One way to do this is with a [[NuGet]] package. This includes modifying the web.config to contain a properly configured dataCacheClients<ref name=dataCacheClients>{{cite web|title=Windows Azure Caching Client Configuration Settings (Web.config), dataCacheClients|url=http://msdn.microsoft.com/en-us/library/jj658973.aspx#dataCacheClients|work=MSDN Library|publisher=Microsoft|accessdate=13 February 2013}}</ref> section. The following example dataCacheClients section specifies that the role that hosts Caching is named “CacheWorker1”.
<syntaxhighlight lang=XML>
|