Sessions across Load Balanced servers

Results 1 to 5 of 5

Thread: Sessions across Load Balanced servers

  1. #1
    DaveMW Guest

    Default Sessions across Load Balanced servers

    We have a password protected area of our web site that uses Session variables to identify users when they are logged in. The problem comes up (periodically) when the user tries to navigate across our site. It will kick them out of the site and ask them to log back in. This is b/c our site is load balanced between two servers, and since Session Variables aren&#039t passed between the two different servers the ASP will check to see if the session variable is present and if it isn&#039t (meaning the user isn&#039t on the same server that they established a session on) it will make them log in again. Anyone have any suggestions about how to handle this problem? I have heard something about storing session variables in a database but didn&#039t receive much info other than that. Any suggestions would be appreciated. Thanks.

  2. #2
    jason Guest

    Default RE: Sessions across Load Balanced servers

    (1rst server)<BR><BR>if iCorrectLogin=1 then<BR> setSessionVariables(1284)<BR> response.redirect ("second_server/validate.asp?uid=1284")<BR>end if<BR><BR>(2nd server)<BR><BR>sInfo = getInfoFromDatabase(request.querystring("uid"))<BR >setSessionVariables(sInfo)<BR>response.redirect(" first_server/pageafterlogin.asp")<BR><BR><BR>would that work or would the servers kill their session variables as soon as the user changed pages ?<BR><BR><BR>

  3. #3
    DaveMW Guest

    Default unfortunately that won't work...

    I believe that the server would kill the session variable if it orginated on the one server or the other. I have looked at all the possible server variables like REMOTE_ADDR, REMOTE_HOST, etc. and none of them is able to distinquish which server the user is coming from either. A single IP is mapped to both web servers. Anyone with any other thoughts??

  4. #4
    Join Date
    Dec 1969

    Default How about a cookie?


  5. #5
    DaveMW Guest

    Default Cookies are only good for one server

    ...if I&#039m not mistaken so that wouldn&#039t work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts