I changed my session on my dev machine from InProc to SQL Server. One of the reasons I did this is that in case the application pool would recycle, I’d have the session available again on restart. Of course, the downside to a SQL session state is performance (at least compared to InProc).
If I move to Azure, do I 1) still need to worry about app pool recycles, 2) still consider SQL session as the best way to do it and 3) are there better options out there for Azure.
Thanks.
1) still need to worry about app pool recycles
– YES. But you can configure the recycle interval. By default IIS recycle app pools every 22 hours I think
2) still consider SQL session as the best way to do it
– YES. And no (look the next question)
3) are there better options out there for Azure.
– Depends, but you may consider using Windows Azure AppFabric Cache for Session State.
Take a look at:
http://www.nuget.org/List/Packages/System.Web.Providers for providers for SQL Azure.
and
http://msdn.microsoft.com/en-us/gg457897 for using Azure Appfabric Cache as Session State.
Edit:
Considering limits for Azure AppFabric Cache, what I have confirmed for sure is that there is always one single connection for Azure AppFabric Cache from every azure instance.