Tomcat/TomEE Cluster
Tomcat/TomEE Cluster
Tomcat and TomEE auto-clustering provides a highly available Java hosting topology designed for performance, horizontal scalability, and fault tolerance. The platform automates cluster creation, session replication, load balancing, firewall configuration, and scaling integration.
Cluster Goals and Overview
Apache Tomcat is a lightweight and widely used Java application server. TomEE extends Tomcat with enterprise technologies required by Jakarta EE applications. The automated cluster solution is designed around three main requirements:
Automated configuration
The platform reduces a complex manual Tomcat clustering setup to a topology option that can be enabled during environment creation.
Tomcat/TomEE Auto-Cluster Installation
Open the environment wizard
Sign in to the platform dashboard and click New Environment.

Select Tomcat or TomEE
Open the Java application-server list, select Tomcat or TomEE, enable the Auto-Clustering switch, configure the remaining topology options, and click Create.

Wait for automatic provisioning
The platform creates the clustered environment and displays it in the dashboard after provisioning finishes.

Tomcat/TomEE Cluster Topology
The default topology uses an NGINX load balancer in front of multiple Tomcat or TomEE application-server nodes. The balancer distributes requests and automatically tracks nodes added, removed, or unavailable.

Session Replication and Cluster Configuration
Auto-Clustering creates a simple TCP cluster that connects Tomcat servers and transfers session changes between instances. Sender and receiver channels are established after the nodes connect.
- Session replication between application-server instances
- Context attribute replication
- Cluster-wide WAR file deployment
- Data-transfer interceptors
- Automatic membership and firewall configuration
Cluster-specific settings are stored in:
/opt/tomcat/conf/tomcat-cluster.xml

channelSendOptions="6", equivalent to synchronous transfer with acknowledgement.org.apache.catalina.ha.context.ReplicatedContext.

No routine manual maintenance required
The platform applies these settings during cluster creation and updates the cluster configuration automatically during its lifecycle.
Tomcat/TomEE Cluster Horizontal Scaling
Automatic horizontal-scaling triggers can add or remove worker nodes according to changing application load.
Open Auto Horizontal Scaling
Go to Settings > Auto Horizontal Scaling for the Tomcat or TomEE cluster environment.

Configure scaling triggers
Create triggers for the required resource type, such as RAM, CPU, network traffic, or disk usage. Define the thresholds, monitoring duration, node adjustment, and scaling limits.
Minimum worker-node count
The cluster must keep at least two worker nodes. Configure the scale-in limit so automatic scaling cannot reduce the application layer below this minimum.
Expected Result
A highly available Tomcat or TomEE environment is created with an NGINX load balancer, multiple application-server nodes, automatic session replication, cluster-wide deployment support, firewall configuration, and optional resource-based horizontal scaling.
Important Notes
- Use TomEE for applications that require Jakarta EE enterprise technologies not included in standard Tomcat.
- The cluster communicates internally through TCP port 4004.
- Static membership is maintained automatically as cluster nodes change.
- Session replication requires applications to use compatible serializable session data.
- Keep at least two worker nodes in the cluster.
- Review load-balancer and application logs after deployment or scaling changes.
