On 24/04/2025 02:02, Zoran Avtarovski wrote:
We have a cluster of tomcat servers on AWS EC2 which operate behind an AWS load balancer with sticky sessions.

We have our session storage on a DB using a JDBC store which for the most part is working well, but we occasionally see duplicate session ids which create issues where a new session with a duplicate session id hijacks an existing session.

What do you mean by a duplicate session?

What causes this situation.

As you can imagine we would like to prevent this from occurring and have been looking into the issue. It looks like using the cluster tag might be the solution but I wanted to tap into the collective wisdom of the group on the best way forward. We can't just add the

|<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> |

That could be quite a big change.

Mark


tag as it uses ip multicast which doesn't work in EC2 as there is no physical broadcast layer. The alternative appears to be to use the StaticMemebrshipService and I wanted to confirm if my config ideas are correct? I have the following setup:

<Membership className="org.apache.catalina.tribes.membership.StaticMembershipService">
    <Member className="org.apache.catalina.tribes.membership.StaticMember"
      host="10.0.1.11" port="4004" uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}"/>
    <Member className="org.apache.catalina.tribes.membership.StaticMember"
      host="10.0.1.12" port="4004" uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}"/>
</Membership>

Does this look right to others and do I need a separate Member tag for each member of the cluster?

I'd appreciate any assistance on this and other suggestions you guys may have.

Z.



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

Reply via email to