I use ASP.NET and WCF services in a load balanced web server environment, using Memcached in the service layer.
I also wanted to replace the use of ASP.NET State Server (for Session State) with Memcached. Now I am afraid it is not a good thing, because from what i understand, Memcached is a cache server rather than a state server, is that true?
If I understand correctly, Memcached is not distributing data to other nodes in the Memcached farm. Instead, a special hashing algorithm is used to determine which one of the nodes in the farm contains the data of a requested key, whereas ASP.NET State Server distributes data ASAP when it has been added, to prevent a Single Point of Failure.
In other words, Memcached should be used only for performance reasons, the data stored in it should always be re-creatable, in case the item has been removed to make room for new objects, or in case the single machine actually storing the data went down.
So can I not rely on Memcached only for storing session state data? If i can't, then i don't understand how Memcached is often compared to and seen as an alternative to using ScaleOut StateServer and ASP.NET State Server, since these are really state servers, which is another thing, right?
I am now a bit unsure as to what is the best approach for high performance distributed session state in a web server farm.
Thanks
See Question&Answers more detail:os