Non-durable ASPStateInMemory -- what happens during a WSFC failover?

A three-node SQL2014 SP1 WSFC cluster hosts SaaS databases.

The databases use ASPStateInMemory to maintain web clients' state information.

The 'durability' option was not selected for the ASPStateInMemory databases.

Database Availability Groups were not established to make state information durable.

What will happen when an instance of SQL2K14 fails from one node to the other, taking the ASPStateInMemory database with it?

I suspect the clients' web browser sessions will freeze, and that to regain access, they will need to begin a new session.

If this is the wrong forum, my apologies in advance.


August 21st, 2015 11:47am

>I suspect the clients' web browser sessions will freeze, and that to regain access, they will need to begin a new session.

You are correct.  When the instance fails over the non-durable state tables will be recreated and all the clients will have to log in again.

If you use the durable session provider, then the sessions will persist on failover, but the performance cost of the durable state solution can be substantial.

You can also consider using the In-Memory OLTP version of ASP.NET state database.

http://blogs.technet.com/b/dataplatforminsider/archive/2014/07/10/new-asp-net-session-state-provider-for-sql-server-in-memory-oltp.aspx

Or forcing delayed durability on the persistent state database, which will cause the session changes to commit lazily and on failover the sessions would loose some data, but still be available.

David

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 12:47pm

Thanks for your response!

May I ask when the performance cost is incurred?  Is it during normal operations, or does it lengthen the failover time?   My understanding is that the failover from one replica of a DAG to another, is on the order of three seconds, whereas, in my environment, a failover of the full WSFC instance takes about 30 seconds.

And:  I thought the ASPStateinMemory was actually an OLTP solution.  Is there another version beside the one I referred to?  I can locate the files named ASPStateInMemory_data.mdf and ASPStateInMemory_log.ldf.

August 21st, 2015 2:16pm

>May I ask when the performance cost is incurred? 

Every time you save session data.  In the persistent model every change in a user's session must be flushed to disk immediately.

David

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 4:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics