Search code examples
tomcatamazon-ec2replicationtomcat8

Tomcat 8 DeltaManager vs BackupManager session replication


I'm going to configure 2 nodes cluster with a separated AWS EC2 instances with Tomcat 8 installed.

I need to configure Tomcat session replication.

According to Tomcat 8 documentation Clustering/Session Replication HOW-TO:

In this release of session replication, Tomcat can perform an all-to-all replication of session state using the DeltaManager or perform backup replication to only one node using the BackupManager. The all-to-all replication is an algorithm that is only efficient when the clusters are small. For larger clusters, to use a primary-secondary session replication where the session will only be stored at one backup server simply setup the BackupManager.

Could you please tell me what does it mean - clusters are small ?

Is it 2.. 5..100... 1000 nodes or what ?


Solution

  • The Tomcat clustering/session replication method in your question uses multicast. Since I see you also have this question tagged with amazon-ec2 you need to know that you can't use multicast on AWS, or any other cloud service for that matter.

    To implement Tomcat session replication on AWS I would recommend looking into methods that use DynamoDB, Redis, or RDS.