Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Session replication techniques with tomcat nodes

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello,


The tomcat doc of apache says, there are three ways, we can achieve session replication among tomcat nodes -

1. Using session persistence, and saving the session to a shared file system (PersistenceManager + FileStore)
2. Using session persistence, and saving the session to a shared database (PersistenceManager + JDBCStore)
3. Using in-memory-replication, using the SimpleTcpCluster that ships with Tomcat 6 (lib/catalina-tribes.jar + lib/catalina-ha.jar)

In my application, I do use SINGLE cluster having TWO tomcat 7.0.25 nodes. I want to configure session replication between these two nodes. Can anybody provide some points describing which one I should use and why ?

I am able to set up session replication using point 3. It works good.

I want to play with option 1 & 2 also. But not able to find out any link that describes point 1 & 2. It would be really very helpful if anyone can provide me some docs or links on point 1 & point 2.

Thanks in advance.
 
Prashant Chotu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
k
 
Prashant Chotu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dont paste rubbish if you do not know the answers.
 
Saloon Keeper
Posts: 24553
168
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You give the impression that you have not familiarized yourself with our basic terms of service. It may have cost you a more timely answer.

The file-based session persistence is the simplest to set up.

The JDBCStore session persistence is the most flexible, if you already have a suitable database infrastructure. Plus it works across machines that don't share a common filesystem subtree.

The memory-based session persistence offers the highest level of performance, but if the OS goes down, the persisted session information is lost.
 
Prashant Chotu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do use session stickiness and planning to use in-memory replication (option 3).

But i see a drawback using this option - unnecessarily session will be replication to one application server to another. The replicated session is only needed if one tomcat fails as I am using session stickiness.
I have googled about this and got to know about using memcached.

If you know about memcached, kindly share your experience of memcached node with session replication.
 
Prashant Chotu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is this - here is the link aspose file stuff ???
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic