Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Session Variables and Load Balancing

New Here ,
Jul 15, 2009 Jul 15, 2009

I've created a web application with Coldfusion that carrys user's information through session variables.  We have three servers that use load balancing and they run Coldfusion 8.  When a user logs into this application, they get in fine but sometimes when they click on a link (once they are logged in), they have to log in again.  I suspect this is because of load balancing and I think whats happening, is that the user clicks on a link then they are sent to another server and that server does not have the existing session variables, so the app kicks them out, which it is suppose to do.  Does anyone know if this sounds true and if it does, is there an easy fix? Or is there an way to test this on the developer's side.  I use this application consistently on our single development server and never have any problems.

TOPICS
Flash integration
2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 15, 2009 Jul 15, 2009

Yes session state management and multiple system load balancing is a big deal that must be thought out and accounted for in the application developement and|or load balancing configuraiton.

You are exactly correct, the session state is in the ram chips on the first system the user visits, if clicking a link sends the user to another system, that system's ram does not have the data.

There are two approaches to this problem.

1) 'Sticky Sessions" where the load balancing is configured such that a user will get stuck to the first system they acess, and all future requests from the same user will go to this system.

2) Session replication.  This is where the session state data will be replicated accross all the systems in the load balancing group.

A google search for either of these topics should turn up plenty of details about the ins and outs, advantages and disadvantges, and complexities of either option.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 15, 2009 Jul 15, 2009
LATEST

Thanks for the quick response.   Have a good day.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources