Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session Replication between tomcat nodes

The tomcat doc of apache says, there are three ways, wecan 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.

like image 678
user1180463 Avatar asked Jul 17 '26 17:07

user1180463


1 Answers

Follow this tutorial

Persistent Session Manager and a shared file store / JDBC store to RDBMS

like image 181
Pankaj Shinde Avatar answered Jul 20 '26 06:07

Pankaj Shinde



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!