Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sessions when the application is distributed  RSS feed

 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We were notified that our application will eventually be running on several geographically dispersed servers. Requests to the application will be distributed to the servers randomly in a "round-robin" fashion courtesy of ZoneEdit's DNS mapping service.

It seems to me that this scheme will make it impossible to use the session to persist data between requests. This will not be a fail over or load balancing scheme where sessions could be migrated.

Has anyone had experience with this sort of setup? I sure hate to go into the application and convert everything that uses the session to use cookies to get the same functionality.

Thanks for any advice or guidance,
-=beeky
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What container are you using?
Some support session replication via TCP.
Some allow you to write your sessions to a common database.
 
Paul Clapham
Sheriff
Posts: 22471
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to think that in some way this is significantly different from a load-balancing scheme. I don't see what the difference is myself. Anyway, I know that Websphere, for example, can be configured to persist session data into a database, so that requests for the same session on different machines will have the same session data. Probably other servers have the same feature (you didn't say which server you were using).

Probably when you explain the significant different between your upcoming setup and a load-balancing setup, that will explain why you can't do that.
 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben and Paul,

Thanks for the replies. We are using Tomcat 5 as a container. Unfortunately, there will be minimal coordination between sites running the application. No common database for instance.

I described this routing scheme as not fail over and not load balancing but it actually is load balancing. However, we are not adopting this scheme for load balancing as much as for political reasons that have nothing to do with performance.

In any case, it looks like sessions are a thing of the past.

Thanks again for the input,
-=beeky
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat supports session replication over TCP.
You might want to see how well this performs before scraping all of your session code.
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Ideally, the communication between nodes would be within the same subnet but you should be able to test to see the performance with your current setup is tolerable.
[ March 13, 2008: Message edited by: Ben Souther ]
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, as for as WebSphere Appilication Server is concerned, it does take care of Session Replication through the centralized Deployment Manager which came to existence from its version 6.0 with the profiles concept.

I have not manually done with those things.As ben described, you may have to look at Tomcat's documentation for achieving this.

Thank you Ben for the information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!