views:

539

answers:

2

I would like to know any experience with the Tomcat Session Cluster solution. Is it production level? Does it scale? Can I use it in a server farm? Do you recommend any other solution for a session cluster? (Ex: database, terracota, jgroups, etc.)

+2  A: 

From all the documentation I've read, it will work fine for a few number of instances but then become an issue.

We use Tomcat as our backend servers but design our applications to use as little session information as possible (basically just logins). Then we front the Tomcats with a load balancer like Apache or Nginx (the later which I'm favoring recently) and use sticky sessions. If a server goes offline (which is unlikely) then the user simply needs to login again, which depending on how you set it up could be transparent to them.

When I was looking to do more session based clustering, Terracotta looked very impressive. But stateless design makes scaling much easier.

tgm
+3  A: 

Another alternative would be the memcached-session-manager, a session failover solution for tomcat: http://code.google.com/p/memcached-session-manager/

I created this project to get the best of performance and reliability and to be able to scale out by just adding more tomcat and memcached nodes.

Cheers, Martin

Martin Grotzke
Is it production level? Does it scale? Which self-respected companies are already using it?
BalusC
It was created with scalability as one of the primary goals, to achieve a high-availability solution with performance as another important goal. You can scale out by just adding more hardware/memcached/tomcat nodes. Adding/removing servers on the fly is supported, there will be no rehashing which is often an issue/challenge with such solutions.I know that it was just integrated in http://www.buch.de (one of the biggest german book stores), and we already have integrated in another (even bigger) application (for that it was created), which is not already (re)launched.
Martin Grotzke

related questions