Session variables and load balancing

M

Max

Frankly, i need session variables to persist regardless of load balancing.
My hoster says save them in files, yuk. Are there any other thoughts

The problem is that the session variables are lost when the load is switched
to another server. Also, i am locked out, because there is now a cookie on
my PC that will not expire until the timeout has expired?

Max
 
M

[MSFT]

Hi Max,

Thank you for using the community.

Regardng the question, you may refer to following article:

ASP and Web Session Management
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnasp/html/
aspwsm.asp

The last two section of the article provide some useful suggestion to
handle session with load balancing.

Regarding the question about cookie, you can rewrite a cookie with same
name and different expired date.

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
M

Max

thanx Luke,

This part
"When a user first comes to a Web application by clicking a hyperlink, or
typing a URL such as http://example.microsoft.com/Webapp/, a load balancer
routes the request to a specific machine in the Web farm. For example, the
load balancer selects a machine named w10.asite.com to handle this request.
ASP will create a new session for the request running on this specific
machine. In the Session_OnStart event, the ASP script can redirect the user,

<% Response.Redirect("http://w10.sample.com/Webapp/firstpage.asp"
%>
"I understand the logic of the above but how do i find the dns address of
the server. ie how do i know it is w10.asite.com?

I am researching Session_OnStart as quickly as i can. I guess i use the
Session_OnStart when the user logs on for example and whenever i refer to a
relative page it takes it from the original server until the session
ends/abandons?

thanx, i think i have more questions coming :eek:)
 
R

Rob Greene

Greetings Max:

On a different solution path, most load balancers have 'Sticky Sessions' (by some name), a process where subsequence request from the
same client route back to the same Web Server as the previous request. Is there a way your ISP can turn this on?

-rwg
This is what I think, not necessarily what is accurate!

--------------------
| From: "Max" <[email protected]>
| Newsgroups: microsoft.public.inetserver.asp.general
| References: <[email protected]> <5#[email protected]>
| Subject: Re: Session variables and load balancing
| Date: Fri, 5 Mar 2004 20:03:41 +1000
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Lines: 59
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 210.49.94.131
| X-Trace: 1078481053 4227 210.49.94.131
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!
216.196.98.140.MISMATCH!border1.nntp.ash.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!
newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.asp.general:267566
| X-Tomcat-NG: microsoft.public.inetserver.asp.general
|
| thanx Luke,
|
| This part
| "When a user first comes to a Web application by clicking a hyperlink, or
| typing a URL such as http://example.microsoft.com/Webapp/, a load balancer
| routes the request to a specific machine in the Web farm. For example, the
| load balancer selects a machine named w10.asite.com to handle this request.
| ASP will create a new session for the request running on this specific
| machine. In the Session_OnStart event, the ASP script can redirect the user,
|
| <% Response.Redirect("http://w10.sample.com/Webapp/firstpage.asp"
| %>
| "I understand the logic of the above but how do i find the dns address of
| the server. ie how do i know it is w10.asite.com?
|
| I am researching Session_OnStart as quickly as i can. I guess i use the
| Session_OnStart when the user logs on for example and whenever i refer to a
| relative page it takes it from the original server until the session
| ends/abandons?
|
| thanx, i think i have more questions coming :eek:)
|
|
|
|
|
|
|
| |
| > Hi Max,
| >
| > Thank you for using the community.
| >
| > Regardng the question, you may refer to following article:
| >
| > ASP and Web Session Management
| >
| http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnasp/html/
| > aspwsm.asp
| >
| > The last two section of the article provide some useful suggestion to
| > handle session with load balancing.
| >
| > Regarding the question about cookie, you can rewrite a cookie with same
| > name and different expired date.
| >
| > Hope this help,
| >
| > Luke
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top