Understanding Session State Management in Windows Azure
Learn about session state management in Windows Azure, including the available modes for storing session values in ASP.NET applications. Explore the options for managing session state in Windows Azure using Table Storage, SQL Azure, and more.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Windows Azure Session State Management Carlos Sardo Senior Professional Developer Tam Tam carlos.sardo@tamtam.nl www.tamtam.nl @TamTamNL http://nl.linkedin.com/in/carlossardo
High level stuff you already know Web Roles Worker Roles Table Storage SQL Azure Blob Storage
What What is is session session state state? ? Session state is usually used to store and retrieve values for a user across ASP.NET pages in a web application. There are four available modes to store session values in ASP.NET: In-Proc, which stores session state in the individual web server s memory. This is the default option if a particular mode is not explicitly specified. State Server, which stores session state in another process, called ASP.NET state service. SQL Server, which stores session state in a SQL Server database Custom, which lets you choose a custom storage provider.
In In- -Proc Proc session mode does not work in session mode does not work in Windows Windows Azure Azure
Managing session state in Managing session state in Windows Azure: What are the options? Azure: What are the options? Windows Table Storage SQL Azure
Table Storage Store Store each Each Each record time time of of each Low Low Cost! 10 10,,000 000 storage Performance Performance tradeoff SQL SQL Azure, Azure, AppFabric each session session in in a a record record will will have have an an expiration each session session if if there s Cost! $ $0 0..14 14 per per GB storage transactions transactions.. tradeoff May AppFabric Cache record.. expiration column there s no no interaction interaction from GB per per month month for that describe describe the from the the user for storage storage capacity capacity and column that the expired expired user.. and $ $0 0..01 01 per per May not Cache .. not perform perform as as fast fast as as the the other other options options::
Table Storage Get Get the resources: the resources: http:// http://code.msdn.microsoft.com/windowsazure/Windows code.msdn.microsoft.com/windowsazure/Windows- -Azure 03d5dc14 03d5dc14 Azure- -ASPNET ASPNET- -
SQL Azure Is Is essentially essentially a a subset Cost Cost effective, effective, especially database database.. It It requires requires you DeleteExpiredSessions stored Microsoft Microsoft does does not subset of of SQL especially when SQL Server Server.. Just when you Just a a few you have have an an existing few modifications modifications! ! existing SQL SQL Azure Azure you to to clean clean the stored procedure not provide provide any any official the expired expired session procedure.. (i (i..e e.: .: WorkerRole official support support for session manually manually by by calling WorkerRole) ) for this this.. calling the the
SQL Azure Get Get the resources: the resources: http:// http://blogs.msdn.com/b/sqlazure/archive/2010/08/04/10046103.aspx blogs.msdn.com/b/sqlazure/archive/2010/08/04/10046103.aspx
It It provides provides a a high service! service! Accessing Accessing RAM Caching Caching obviously obviously provides available available options options.. It s It s officially officially supported Despite Despite its its advantages, relatively relatively high, high, starting to to $ $325 325 per per month month for high- -performance, performance, in in- -memory, memory, distributed distributed caching caching RAM is is much much faster provides the faster than the highest than accessing accessing disk, highest performance performance access disk, so so Windows Windows Azure access of of all all the Azure the supported by by Microsoft advantages, the starting from from $ $45 45 per for 4 4 GB GB.. Microsoft.. the charge charge of of Windows per month month for Windows Azure for 128 128 MB, Azure Caching Caching is is MB, all all the the way way up up
Get Get the resources: the resources: http:// http://blogs.msdn.com/b/danbuche/archive/2011/05/06/managing blogs.msdn.com/b/danbuche/archive/2011/05/06/managing- -asp net net- -session session- -state state- -with with- -windows windows- -azure azure- -appfabric asp- - appfabric- -cache.aspx cache.aspx
Update! Update! ASP.NET Universal Providers ASP.NET Universal Providers http http:// ://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNET www.hanselman.com/blog/IntroducingSystemWebProvidersASPNET UniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCom UniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCom pactAndSQLAzure.aspx pactAndSQLAzure.aspx
Thanks! Want to know more about this? Mail me. carlos.sardo@tamtam.nl www.tamtam.nl @TamTamNL Any Qs? Get us on Twitter http://nl.linkedin.com/in/carlossardo
Thanks! All artwork on this slide deck created by Josh Twist. If you steal it please provide credit and a link to http://www.thejoyofcode.com/cloud_artwork.aspx http://acloudyplace.com/2012/02/managing-session-state- in-windows-azure-what-are-the-options/ http://www.hanselman.com/blog/IntroducingSystemWebP rovidersASPNETUniversalProvidersForSessionMembers hipRolesAndUserProfileOnSQLCompactAndSQLAzure.a spx