Session State

  • Thread starter Thread starter Nhi Lam
  • Start date Start date
N

Nhi Lam

Hi,

I understand that there are 3 modes in which I can
configure the SessionStateModule. What I need is an out of
process Session State store with fail over support.
The "SQL Server Mode" seems to be it, but I heard there is
quite a bit of degradation in performance for using this
mode. My next option is the "State Server Mode". However,
this mode does not give me the fail over support. Is there
anything that I can do the enhance the "State Server Mode"
to provide fail over support, such as dedicating 2 Session
State servers instead of 1, and adding the hooks to
replicate the session states from one server to the next?

Thanks in advance for your help.
--Nhi Lam
 
Hi Yan-Hong Huang,

Thanks for the response. I can't use the "SQL Server Mode"
because of performance reasons. So my only option is
the "Out of Process mode". However, I am concerned that
when the computer that hosts the stateserver service
crashes, then all of our users will lose their sessions.
What I'd like to know is if there's a way to run 2
computers to host the stateserver service and have them
replicate the session states among themselves. In this
way, if one computer crashes, the other one can take over.

Thanks,
--Nhi Lam
 
Hello Nhi,

I will send email to confirm if there is any way to do it. I will get back
here ASAP. Thanks.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Nhi Lam" <[email protected]>
!Sender: "Nhi Lam" <[email protected]>
!References: <[email protected]>
<[email protected]>
!Subject: RE: Session State
!Date: Wed, 25 Jun 2003 10:11:37 -0700
!Lines: 131
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcM7PNZGkJX6wA7rR3yThb0LtTTt5A==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154852
!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Hi Yan-Hong Huang,
!
!Thanks for the response. I can't use the "SQL Server Mode"
!because of performance reasons. So my only option is
!the "Out of Process mode". However, I am concerned that
!when the computer that hosts the stateserver service
!crashes, then all of our users will lose their sessions.
!What I'd like to know is if there's a way to run 2
!computers to host the stateserver service and have them
!replicate the session states among themselves. In this
!way, if one computer crashes, the other one can take over.
!
!Thanks,
!--Nhi Lam
!
!>-----Original Message-----
!>Hello Nhi,
!>
!>From MSDN:
!>StateServer: Alternately, StateServer mode uses a stand-
!alone Microsoft
!>Windows service to store session variables. Because this
!service is
!>independent of Microsoft Internet Information Server
!(IIS), it can run on a
!>separate server. You can use this mode for a load-
!balancing solution
!>because multiple Web servers can share session variables.
!Although session
!>variables are not lost if you restart IIS, performance is
!impacted when you
!>cross process boundaries.
!>
!>So we could just use one stateserver service.
!>
!>When we are considering these three types of ASP.NET
!session state modes,
!>It's worth mentioning, briefly, some of the performance
!and reliability
!>issue.
!>
!>In process:
!>In process will perform best because the session state
!memory is kept
!>within the ASP.NET process. For Web applications hosted
!on a single server,
!>applications in which the user is guaranteed to be re-
!directed to the
!>correct server, or when session state data is not
!critical (in the sense
!>that it can be re-constructed or re-populated), this is
!the mode to choose.
!>
!>Out of process:
!>This mode is best used when performance is important but
!you can't
!>guarantee which server a user will request an application
!from. With
!>out-of-process mode, you get the performance of reading
!from memory and the
!>reliability of a separate process that manages the state
!for all servers.
!>
!>SQL Server:
!>This mode is best used when the reliability of the data
!is fundamental to
!>the stability of the application, as the database can be
!clustered for
!>failure scenarios. The performance isn't as fast as out
!of process, but the
!>tradeoff is the higher level of reliability.
!>
!>Hope it helps.
!>
!>Best regards,
!>yhhuang
!>VS.NET, Visual C++
!>Microsoft
!>
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>Got .Net? http://www.gotdotnet.com
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "Nhi Lam" <[email protected]>
!>!Sender: "Nhi Lam" <[email protected]>
!>!Subject: Session State
!>!Date: Tue, 24 Jun 2003 09:56:31 -0700
!>!Lines: 17
!>!Message-ID: <[email protected]>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Thread-Index: AcM6cY+0trTuqTayQ36G3C1UQ8lEpw==
!>!Newsgroups: microsoft.public.dotnet.framework.aspnet
!>!Path: cpmsftngxa06.phx.gbl
!>!Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework.aspnet:154539
!>!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!>!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!>!
!>!Hi,
!>!
!>!I understand that there are 3 modes in which I can
!>!configure the SessionStateModule. What I need is an out
!of
!>!process Session State store with fail over support.
!>!The "SQL Server Mode" seems to be it, but I heard there
!is
!>!quite a bit of degradation in performance for using this
!>!mode. My next option is the "State Server Mode".
!However,
!>!this mode does not give me the fail over support. Is
!there
!>!anything that I can do the enhance the "State Server
!Mode"
!>!to provide fail over support, such as dedicating 2
!Session
!>!State servers instead of 1, and adding the hooks to
!>!replicate the session states from one server to the next?
!>!
!>!Thanks in advance for your help.
!>!--Nhi Lam
!>!
!>!
!>
!>.
!>
!
 
Hello Nhi,

It¡¯s impossible to have two stateserver services running for state
management. If rebustness is really a concern, we could only use SQL
Server with clustering.

For details, see this FAQ:
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504

Hope it helps.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Nhi Lam" <[email protected]>
!Sender: "Nhi Lam" <[email protected]>
!References: <[email protected]>
<[email protected]>
!Subject: RE: Session State
!Date: Wed, 25 Jun 2003 10:11:37 -0700
!Lines: 131
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcM7PNZGkJX6wA7rR3yThb0LtTTt5A==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154852
!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Hi Yan-Hong Huang,
!
!Thanks for the response. I can't use the "SQL Server Mode"
!because of performance reasons. So my only option is
!the "Out of Process mode". However, I am concerned that
!when the computer that hosts the stateserver service
!crashes, then all of our users will lose their sessions.
!What I'd like to know is if there's a way to run 2
!computers to host the stateserver service and have them
!replicate the session states among themselves. In this
!way, if one computer crashes, the other one can take over.
!
!Thanks,
!--Nhi Lam
!
!>-----Original Message-----
!>Hello Nhi,
!>
!>From MSDN:
!>StateServer: Alternately, StateServer mode uses a stand-
!alone Microsoft
!>Windows service to store session variables. Because this
!service is
!>independent of Microsoft Internet Information Server
!(IIS), it can run on a
!>separate server. You can use this mode for a load-
!balancing solution
!>because multiple Web servers can share session variables.
!Although session
!>variables are not lost if you restart IIS, performance is
!impacted when you
!>cross process boundaries.
!>
!>So we could just use one stateserver service.
!>
!>When we are considering these three types of ASP.NET
!session state modes,
!>It's worth mentioning, briefly, some of the performance
!and reliability
!>issue.
!>
!>In process:
!>In process will perform best because the session state
!memory is kept
!>within the ASP.NET process. For Web applications hosted
!on a single server,
!>applications in which the user is guaranteed to be re-
!directed to the
!>correct server, or when session state data is not
!critical (in the sense
!>that it can be re-constructed or re-populated), this is
!the mode to choose.
!>
!>Out of process:
!>This mode is best used when performance is important but
!you can't
!>guarantee which server a user will request an application
!from. With
!>out-of-process mode, you get the performance of reading
!from memory and the
!>reliability of a separate process that manages the state
!for all servers.
!>
!>SQL Server:
!>This mode is best used when the reliability of the data
!is fundamental to
!>the stability of the application, as the database can be
!clustered for
!>failure scenarios. The performance isn't as fast as out
!of process, but the
!>tradeoff is the higher level of reliability.
!>
!>Hope it helps.
!>
!>Best regards,
!>yhhuang
!>VS.NET, Visual C++
!>Microsoft
!>
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>Got .Net? http://www.gotdotnet.com
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "Nhi Lam" <[email protected]>
!>!Sender: "Nhi Lam" <[email protected]>
!>!Subject: Session State
!>!Date: Tue, 24 Jun 2003 09:56:31 -0700
!>!Lines: 17
!>!Message-ID: <[email protected]>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Thread-Index: AcM6cY+0trTuqTayQ36G3C1UQ8lEpw==
!>!Newsgroups: microsoft.public.dotnet.framework.aspnet
!>!Path: cpmsftngxa06.phx.gbl
!>!Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework.aspnet:154539
!>!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!>!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!>!
!>!Hi,
!>!
!>!I understand that there are 3 modes in which I can
!>!configure the SessionStateModule. What I need is an out
!of
!>!process Session State store with fail over support.
!>!The "SQL Server Mode" seems to be it, but I heard there
!is
!>!quite a bit of degradation in performance for using this
!>!mode. My next option is the "State Server Mode".
!However,
!>!this mode does not give me the fail over support. Is
!there
!>!anything that I can do the enhance the "State Server
!Mode"
!>!to provide fail over support, such as dedicating 2
!Session
!>!State servers instead of 1, and adding the hooks to
!>!replicate the session states from one server to the next?
!>!
!>!Thanks in advance for your help.
!>!--Nhi Lam
!>!
!>!
!>
!>.
!>
!
 
Back
Top