0

I'm using SQLServer to store my ASP.NET session state. I also have several web servers which are connected via load balancer. Each server store it's session in the SQLSerer DB. The problem here is that the DB is a single point of failure.

My question is - how can I store my session across multiple SQLServer servers and be able to get the most updated data from each of them?

3
  • 1
    If you want to have high availability, create a failover SQL Server cluster or use database mirroring. SQL Server knows how to failover automatically from one node to another, and so does ADO.NET. Or use a hosted solutions with a failover option, like SQL Azure. Commented Nov 17, 2014 at 16:05
  • Is the session state really the part of this environment that is most important to make highly available? Does the application not use any databases for anything other than session data? Commented Nov 17, 2014 at 16:16
  • The app has 2 DB (legacy), Oracle for the data and SQL Server for the session state. The app won't work if the SQL Server is not available Commented Nov 18, 2014 at 12:37

1 Answer 1

2

How well would the rest of your app perform if the database was down? This question is really about high availability of the database. You could add failover clustering to your SQL Server, which can get expensive. Or you can store your session in a distributed cache, such as memcached, redis or AppFabric.

Sign up to request clarification or add additional context in comments.

5 Comments

+1 for pointing out the obvious - that the HA problem is not limited to the sessions (well, most likely - it may be the rare case of a databae having nothing else to store than a session).
Do you have previous experience with one of distributed caches? Which one is considered better for storing ASP.NET Session
AppFabric under Azure is the only one I have used in production.
If you use ditributed cache when how do you force the data to be the same on every node? The session is state is dynamic data that changes quickly.
AppFabric replaces the Session storage, so you write to the Session object the same as you always would, and the cache handles the high availability part.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.