> -----Original Message-----
> From: vi...@thepenguin.org [mailto:vi...@thepenguin.org]
> Sent: Saturday, July 20, 2013 7:25 AM
> To: Tomcat Users List
> Subject: Enable session persistence between two tomcat nodes behind
> load balancer
> 
> Hello:
> 
> I have been searching for an answer to how to set this up. I find a lot
> of posts on session persistence but none seem to describe how to set it
> up. Is there a simple explanation out there that tells me how I go
> about setting up session persistence (with Apache, I would just set up
> memcached on the db server and configure the memcache module on each
> Apache instance to point to the memcached and it works). I don't need
> opcode persistence. I just want the tomcats to either a) direct all
> session traffic to a single node or b) make the two tomcats aware of
> all sessions. Can someone point me in the right direction? I am not a
> java coder, but if code changes need to be made, I can work through it.
> 
> Thanks,
> 
> Vicki
> 
> 

Vicki -
I think you've got your terms a little mixed up here, but not much.
From your description what you are really looking for is session "replication".
You are in luck, because the default server.xml has a commented out section on 
how to set up replication right there (at least up to Tomcat 6.x). You also 
want to review the documentation on replication on the Tomcat website for your 
release (http://tomcat.apache.org).
I said "not much" above, because replication relies on persistence-ability, 
meaning they both need the same basic setup in order to work. As I recall from 
looking into it (but not setting up a production setup), you must declare your 
sessions persistable in your code for either function to work properly.
Jeff
p.s. In case you're wondering why not production, turns out our initial dev 
team put way too much info in the session to make replication a feasible option 
for us at the time.  I think we've been whittling it away over time, but 
haven't tried it since the first effort.

Reply via email to