views:

2055

answers:

3

Scenario:

The website is hosted on 3 servers using IIS on each.

All 3 servers are clustered using the network load balancing software that comes with Windows Server 2003.

All 3 sites are configured to store session state on a separate server that has been designated as a "State Server".

I have been asked to scale up the "State Server". Is there a way that I can have more than one state server and synchronize state between them, so if one of the state servers goes down the others will be able to serve the state information?

+6  A: 

We use Scale Out State Server for this where I work, and it does the job wonderfully and is dead simple to set up. I understand Microsoft is also working on a similar product called Velocity, but I don't have any experience with it.

The only downside to SOSS is that you've got to pay for it - but I've had nothing but great experiences interacting with their sales and support team. If you end up licensing, do me a favor and let them know that Daniel from Gratis sent you ;)

Daniel Schaffer
+1  A: 

You are looking for a distributed caching technology. Microsoft Velocity is one that has examples posted by Microsoft for replacing the default ASP.NET Session state with Velocity that it can be distributed. There are other caching providers such as Memcache.

Edit: Updating this answer for info more relevant to current time, this type of functionality is built into Windows Azure with the AppFabric product. Some brief information about this can be seen here: Windows Server and Azure AppFabric virtual launch May 20th

Chris Marisic
The problem with Velocity is that is has never been officially released. It's been years now and all we have is CTP. I'm wondering what support can you expect from MS? Also the Velocity team blog has been pretty quite for a long time and this makes me wonder if MS isn't going to kill the project in a not-so-distant future.
Piotr Owsiak
@Piotr Velocity was the precusor to AppFabric that is part of the Azure technology line up, cite: http://www.hanselman.com/blog/WindowsServerAndAzureAppFabricVirtualLaunchMay20th.aspx I updated my answer to include this
Chris Marisic
@Chris Marisic: Thanks for the update, I stand corrected :)
Piotr Owsiak
+5  A: 

I'd go for memcached. You could set it up on each of the web servers and then you could scale it with each new web server you add. I've found a couple of clients on codeplex before.

Nick
will Memcached actually keep the nodes in the server farm in sync? To prevent a Single Point of Failure, they would need to stay in sync, so that when items are added or removed, all nodes get notified.
baretta
yes, the d in memcached stands for distributed, so it syncs the information across all nodes in your cluster.
Nick
Ah! So then, ASP.NET State Server IS interchangeable with Memcached!http://stackoverflow.com/questions/290966/is-memcached-interchangeable-with-asp-net-state-serverI was afraid Memcached wouldn't keep nodes in sync..
baretta
Are you sure? From the website "Memcached is a caching layer for your application. It is not designed to have any data redundancy." http://code.google.com/p/memcached/wiki/FAQ#How_is_memcached_redundant?
caveman_dick
Its a single cache that is distributed across multiple nodes, so no matter which node you end up connecting to you're still using the same "cache"
Nick
I think there's been some confusion here. memcached will distribute the hash table across as many servers as you provide, but this means that any key you push into the array will only exist on a single server, hence the d. If that server dies for whatever reason the key will die with it and a get on that key will return a blank. Though I still think it's a great solution for scaling a session store :)
Ariel