[ASP.NET] Scaleout Server - Distributed in-memory ASP.NET session state
Most server-farm applications
store fast-changing workload data, such as ASP.NET session-state, in a
centralized, back-end database. A new software product, called ScaleOut StateServer , improves performance by hosting session-state directly on the farm using distributed, in-memory storage.
Source: Scalable Session-State Storage for ASP.NET Server Farms Released - TheServerSide.NET
Saw this a few weeks ago on TheServerSide.NET
and keep forgetting to post on it.
This is a really cool solution to managing ASP.NET session state in a load
balanced environment. ASP.NET offers three session state options out of the box,
but they all have problems when you're load balanced:
- InProc - Doesn't work when load balanced since state
is not shared between webservers
- ASP.NET StateServer - Single point of failure,
requires round trips to the state server for every page hit[1]
- SQL Server Session State - Still a single point of failure unless you're
clustered, requires an extra database hit for every page hit[1], can
cause database locking (MSKB
843400, which I've experienced first hand)
Or, as the ScaleOut StateServer site site tells it:

We went through some hoops with this on a recent project - We used SQL Server State,
which pained me because we'd removed most of the database hits through aggressive
caching and had to add per-page database hits for session state lookup. Then we
ran into locking issues and ended up dropping back to InProc with sticky bit
until we are able to test the hotfix for the locking problems.
The ScaleOut StateServer 's solution is really slick:
To save and restore session-state, ScaleOut StateServer extends ASP.NET’s
InProc mode for the sessionState attribute. Do not confuse this setting with the
alternative StateServer mode, which is designed for use with Microsoft’s
built-in, single host, session-state server.
So as far as ASP.NET knows, it's just using InProc
session state. Behind the scenes, though, Scaleout Server is syncing states
across UDP with two other webservers in the farm. It's scalable, since it only
keeps three copies of a session's state regardless of the number of servers in
the farm (up to 64, they say). Their support
information
shows that they're hooking into ASP.NET with an Http
Module.
The obligatory purty pictures:
|
With SQL Server Session State | With ScaleOut |
 |  |
Disclosures:
No, I haven't had a chance to try it out yet, although
they do offer a free 30 day
demo so you can try it out for me.
No, I don't have any affiliation
with ScaleOut and don't get anything for talking them up.
[1] I've heard rumors that unnecessary lookups are
avoided if subsequent hits go to the same server, although I haven't
verified this.