views:

437

answers:

3

In my current project, we have to create a website (ASP.NET MVC) which is likely to have sufficient load to demand a server farm. I understand that if server farm is used, session states must be stored on somewhere else such as SQL server database or state server.

After some experimentation, we are inclined to use the state server mechanism but the fact that it will have single point of failure, makes me nervous. Is there any method by which we can avoid "single point of failure" when using state server?

+1  A: 

You could set up SQL Server replication to another machine or use a failover cluster. This could potentially be expensive but would make your database component more robust.

Technically, your web server equipment room is a single point of failure, as well as your network, etc. I wouldn't necessarily be more nervous about session state than any of those.

womp
I dont understand! I believe ASP.NET state server does NOT use SQL server. Then how can SQL server failover cluster help me? But I do take note of "network also being single point of failure" which is really a valid point.
Hemant
Whups, I compleetely misread your question, I thought you said you were going with sql server, not state server.... I'll probably delete this answer ;)
womp
I value the second point (see other aspects of single point of failure) so may be edit, but don't delete the answer.
Hemant
Well, with that mentality why bother with any redundancy at all?
UpTheCreek
+4  A: 

Hi,

There is something called session state partitioning that you could use, in order to avoid a single point of failure. If this still doesn't suit you, then you might consider trying the ASP.NET Velocity project, which it looks promising even though it is in CTP stage only.

If you want full scalability and redundancy, then you should probably use a SQL Server Cluster.

Bogdan Maxim
I don't see how session state partitioning avoids the single point of failure. All it does is to have multiple state servers and make sure that a given type id always persisted to the same server, but if this server fails session will be lost. But this could be useful to offload a single state server.
Darin Dimitrov
Another implementation (http://en.aspnet-bhs.info/post/State-Server-Partitioning.aspx) based on the link provided in the answer addresses the issues of state server failure.
Hemant
At least, if one server fails, the rest would be up. Velocity is supposed though to have a failover mechanism..
Bogdan Maxim
Excellent answer :)
Andrei Rinea
+1  A: 

sharedcache (http://www.sharedcache.com or http://sharedcache.codeplex.com) has an implementation for sessions, it's not released so far but people are using it.