开发者

Windows Azure:Do we need External Persisted storage for Web role having Multiple Instances

Do we need to maintain extranal Persisted storage if we maintain a single Web Role with multiple instances?

If we deploy a si开发者_Go百科te into azure with WebRole instance count greater that 1, is session state, Application State is shared among the Instances automaticaly?

Consider we have created two instances for webRole. If I made a request to the server, consider Instance1 processed the request given the response. In this request processing we saved some data into session. When I do a post back consider due to some reason Instance2 processed my postback request. Here my question is how the Instance2 can access the session data that is saved in my previous request?


If you use in-proc session state, each instance will have its own session data (not a good thing). You can easily use the new AppFabric Cache Session State provider, which gives you an instance-agnostic storage medium for your session state.

Here's the MSDN info on this. There's also a lab in the Windows Azure Platform Training Kit, called Building Windows Azure Applications with the Caching Service, that walks you through this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜