How to use tomcat clustering in the cloud.

The load-balancer and the sticky (or not sticky) logic is provided by the cloud it self, basically you have to expose a service and configure a route. Cloud configuration depends on the cloud providers, document for the mean cloud providers will be added to this wiki. The tomcat clustering for the cloud uses Kubernetes you have to configure your nodes to use Kubernetes, all cloud providers support Kubernetes. Kubernetes uses Docker so you have to create a Docker image to use tomcat in the cloud. There are 2 ways to organize your images, use a standalone tomcat and add your webapps to it or prepare your webapps as a micro service and have one image per webapps. Each image will be started as a pod on kubernetes, you can scale up and down by changing the number of pods running your webapp or your tomcat. Hanging or dying pods are restarted by kubernetes.

1 - "Full" tomcat configuration:

In server.xml use the following:

2 - Example there is an example to use it with OpenShift in https://github.com/jfclere/tomcat-kubernetes

ClusteringCloud (last edited 2018-10-10 14:24:37 by JeanFredericClere)