advantages of State Server over InProc server

  • Thread starter Thread starter Smokey Grindle
  • Start date Start date
S

Smokey Grindle

What are the advantages of using ASP.NET's session state server service over
using InProc state sessions? Also if you have a state server service
running, is there any way to find out when a session ended? with the inproc
ones you can use the global.asax's session_ended method...
 
1) Memory consumption. If you store a lot of data in session variables, you
will likely observe that the asp.net process memory grows with time.

2) Restarting IIS won't affect your session variables.

Session_ended event is not very reliable anyway.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
Technically, the model is supposed to be the same no matter what model. In
reality, there are bumps.

I am not sure about the state_end condition, as I rarely stick things into
session that cannot be automagically cleaned up, if I use session at all.
Someone else will have to tackle that one, but I would assume it works
pretty much the same, with the exception of potentially having that event
fire on multiple machines. No big deal really, as the actual state mechanism
is centralized.

What is the benefit? Scalability primarily. You can add machines to your web
farm without worrying about controlling state. If you have to keep state
over a failure, there is also SQL Server as an option. Note that you do
trade a bit of performance for this scalability.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
So too for the outproc Session state service.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


sloan said:
The objects that go into Sql Server state management, must be
[Serializable]
fyi.




Smokey Grindle said:
What are the advantages of using ASP.NET's session state server service over
using InProc state sessions? Also if you have a state server service
running, is there any way to find out when a session ended? with the inproc
ones you can use the global.asax's session_ended method...
 
Back
Top