473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Session State

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

Nov 17 '05 #1
3 5945
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 MicrosoftWindows service to store session variables. Because this service isindependent of Microsoft Internet Information Server (IIS), it can run on aseparate server. You can use this mode for a load- balancing solutionbecause multiple Web servers can share session variables. Although sessionvariables are not lost if you restart IIS, performance is impacted when youcross 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 reliabilityissue.

In process:
In process will perform best because the session state memory is keptwithin the ASP.NET process. For Web applications hosted on a single server,applications in which the user is guaranteed to be re- directed to thecorrect server, or when session state data is not critical (in the sensethat 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'tguarantee which server a user will request an application from. Without-of-process mode, you get the performance of reading from memory and thereliability 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 tothe stability of the application, as the database can be clustered forfailure scenarios. The performance isn't as fast as out of process, but thetradeoff 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" <nh****@secretplace.com>
!Sender: "Nhi Lam" <nh****@secretplace.com>
!Subject: Session State
!Date: Tue, 24 Jun 2003 09:56:31 -0700
!Lines: 17
!Message-ID: <0f****************************@phx.gbl>
!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
!
!

.

Nov 17 '05 #2
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" <nh****@secretplace.com>
!Sender: "Nhi Lam" <nh****@secretplace.com>
!References: <0f****************************@phx.gbl>
<Sm**************@cpmsftngxa06.phx.gbl>
!Subject: RE: Session State
!Date: Wed, 25 Jun 2003 10:11:37 -0700
!Lines: 131
!Message-ID: <0d****************************@phx.gbl>
!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" <nh****@secretplace.com>
!>!Sender: "Nhi Lam" <nh****@secretplace.com>
!>!Subject: Session State
!>!Date: Tue, 24 Jun 2003 09:56:31 -0700
!>!Lines: 17
!>!Message-ID: <0f****************************@phx.gbl>
!>!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
!>!
!>!
!>
!>.
!>
!

Nov 17 '05 #3
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.a...=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" <nh****@secretplace.com>
!Sender: "Nhi Lam" <nh****@secretplace.com>
!References: <0f****************************@phx.gbl>
<Sm**************@cpmsftngxa06.phx.gbl>
!Subject: RE: Session State
!Date: Wed, 25 Jun 2003 10:11:37 -0700
!Lines: 131
!Message-ID: <0d****************************@phx.gbl>
!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" <nh****@secretplace.com>
!>!Sender: "Nhi Lam" <nh****@secretplace.com>
!>!Subject: Session State
!>!Date: Tue, 24 Jun 2003 09:56:31 -0700
!>!Lines: 17
!>!Message-ID: <0f****************************@phx.gbl>
!>!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
!>!
!>!
!>
!>.
!>
!

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
5
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.