Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sessions and Load Balancing

Posted on 2003-10-30
5
Medium Priority
?
332 Views
Last Modified: 2011-09-20
Hello,


I'm facing a stiff problem.

After a user-login, i store his information in a session. No big deal..

but

Because we use load balancing the session is only recognised on the server it was created.

I also tried to do this with cookies but this also has the same problem.


Anyone ?


kind regars

Xyleen
0
Comment
Question by:Xyleen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Assisted Solution

by:jimmack
jimmack earned 180 total points
ID: 9651743
Have a look at:

http://raibledesigns.com/tomcat/index.html

Here's a quote from the page:

 1. Session affinity works
Which means that when a client browser is directed to a Tomcat server by the load balancer, then future queries from that same browser session will always be directed to the same tomcat server. This is important because sessions that are created in a specific tomcat server, say "tomcat1", do not exist in the other server "tomcat2", and thus if the client was directed to another tomcat server than the one where his session is stored, then all his session data would be lost.

Some people are working on sessions that will be replicated across all tomcat servers in the cluster, so I'll just wait for it to become available rather than make a homebrewed distributed session mechanism.

The downside of not having sessions replicated across all the tomcat servers in the cluster is that if one tomcat server dies, all the sessions that it contained are lost, which usually makes a lot of unhappy users.
0
 
LVL 3

Assisted Solution

by:evedder
evedder earned 80 total points
ID: 9654403
maybe you can encrypt tje user information and pass it throug parameters in the URL
0
 

Author Comment

by:Xyleen
ID: 9656073
jimmack,


I don't have access to the tomcat-installation :(

Evedder,

The content displayed on the pages is being served by a content management system so that's not an option :(
0
 
LVL 15

Accepted Solution

by:
jimmack earned 180 total points
ID: 9656462
Why doesn't the cookie solution work?

Forget about storing the data in a session.  Just retrieve the cookie and check that for every page.  Perhaps you could do this with a filter to prevent having to duplicate code on all your JSPs/Servlets.
0
 

Author Comment

by:Xyleen
ID: 9657499
Hello,


I've fixed it with cookies created by javascript, they work. Cookies created by jsp don't :(

Thanks all
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
A new hacking trick has emerged leveraging your own helpdesk or support ticketing tools as an easy way to distribute malware.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question