Session And Caching Issues in Windows Azure
ASP.NET is well embraced by the Windows Azure platform. How does Azure handle session and caching issues?
Multiple instances of a web site role are running on indepdent appdomains, and, at least in the current CTP, they are running on independent VMs. Shared information needs to be put into the Windows Azure Storage (blob/queue/table) Services or external services. The local storage on each role instances should be used as cache only, since role instance node could be killed at any moment.
The Windows Azure SDK contains a sample session provider implementation (basically the same functionality as the corresponding SQL provider; see the AspProvider sample and the AspProviderDemo for an example of how to use it.)
When you configure your Web role to use this provider, session state is automatically stored in Windows Azure table storage and in Windows Azure blob storage. This makes sure that you can access your session state in an environment where your Web role can be hosted on multiple machines inside the fabric.
To be more precise about the storage locations: the session state itself is stored in a blob (as no pre-knowledge of how big the session state will be can be made) and configuration info about the session is stored in a table.
When you look at the AspProvider directory in the samples, there is an extended readme describing the design and the table layout for the different providers.
posted on 2009-01-17 19:53 Yang - Windows Azure 阅读(244) 评论(0) 编辑 收藏 举报