On Jul 20, 2013, at 8:25 AM, vi...@thepenguin.org wrote:

> 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,

We need more info here.  Apache what?  HTTPD?  Tomcat?  I'm going to assume 
Tomcat since you sent this to the Tomcat mailing list.  Ok, now what version 
are you using? 6.0.x, 7.0.x?

> 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.

How do you want to persist your sessions?  Memcached is an in-memory cache, so 
calling it persistence is a stretch.  It is a good way to make your sessions 
available to multiple Tomcat servers though, so you just have to think about 
exactly what you want here.

Out-of-the-box Tomcat supports persistence of sessions to disk and to a 
relational database.  Reference docs can be found here.

  http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Nested_Components

Configuration is pretty simple, you just need to adjust the <Manager /> tag in 
server.xml, and if using a relational database create the table.

> I just want the tomcats to either a) direct all session traffic to a single 
> node

This sounds like you're referring to sticky sessions and that something your 
load balancer would do, not Tomcat.  Also, this has nothing to do with session 
replication.  It just binds a user's requests to one particular Tomcat node and 
that node happens to contain the data for that session.  If the node hosting a 
particular session went down, you'd lose your user's session data.  In some 
cases that's OK though, it just depends on your needs.  

If you need something with better availability, you could pair it with session 
replication or session persistence.

Here's a link to the docs for session replication.  The link for session 
persistence is above.

   http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

> or b) make the two tomcats aware of all sessions. Can someone point me in the 
> right direction?

See links above.  Try to follow the instructions there, if you have specific 
questions or if your config isn't working post a more detailed response to the 
mailing list.

Dan

> I am not a java coder, but if code changes need to be made, I can work 
> through it.
> 
> Thanks,
> 
> Vicki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to