Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat session-cluster: Is it production level? Does it scale?

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

like image 418
TraderJoeChicago Avatar asked Jun 18 '09 12:06

TraderJoeChicago


People also ask

How does session replication work in Tomcat?

Tomcat provides in-memory session replication through a combination of serializable session attributes, "sticky sessions", which are provided by the load balancer, and specialized components configured in Tomcat's XML configuration files.

What is Tomcat clustering?

Tomcat clustering is a group of Tomcat instances that are connected. An instance of Tomcat is an independent system. Clustering instances of Tomcat makes them interconnected. Tomcat instances in a Tomcat cluster are often referred to as a node.

How do you achieve cluster session replication?

This is achieved by using load balancers to tie the servers together using each server's network port and IP address. Each node in the cluster shares session data by replicating data to each node in the cluster. The result is a cluster of Tomcat servers appears as a single server to client systems.

What is session persistence in Tomcat?

Persistence Across Restarts Whenever Apache Tomcat is shut down normally and restarted, or when an application reload is triggered, the standard Manager implementation will attempt to serialize all currently active sessions to a disk file located via the pathname attribute.


1 Answers

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

like image 53
MartinGrotzke Avatar answered Oct 08 '22 16:10

MartinGrotzke