Cloudlets Platform provides automated session replication between Tomcat and TomEE servers, that ensures high availability within Java cluster.

Session replication helps to replicate the data stored in a session between different instances, which have to be a part of the same cluster. When session replication is enabled in a cluster environment, the entire session data is copied on a replicated instance. The session replication does not copy the attributes that cannot be serialized in a session and any instance specific data. Session replication provides high reliability, scalability, and perfect failover capabilities.

high availability session replication

In Cloudlets the replication itself is implemented via multicast, ensuring:

  • session exchange between the nodes through the local net;
  • less destruction points in the system (as there is no need to use additional programmes of memcache type).

Enable Session Replication

Let's go through several simple steps to start using replication in Cloudlets:

Log into the dashboard and click New Environment.

Within Java, select the required application server you need and turn on High-Availability as shown on the picture below:

You can observe all the active tasks that are automatically performed by the platform in the task manager:

After your environment is installed, you'll see that replication is enabled:

How High Availability Works?

When the user makes his first request to the web application load balancer, it redirects the request to one of the servers within the cluster. Throughout the session user continues to work with that same instance of application server (so called Sticky Sessions). Obviously the other instance in the cluster is also working serving its half.

If one of the instances fails, the users, who were on that instance get automatically switched to the other instance in this cluster. Thanks to the replication, the other instance already has all the sessions of the failed instance, so end-users never notice any change. In the highly unlikely event of both instances in a cluster failing, users get redirected to another cluster (if there areseveral).

environment with high availability scheme

Also, users can turn on/off replication within already created environment by changing its topology.

Inspired?

Hurry up to test it out for free - simply register at Cloudlets Dashboard and create your own highly available Java projects.

Cloudlets team is ready to help you with any advice you may need in setting up and configuring your environment.  Our mission is to provide you with a service that not only outperforms competitors but costs you less. Please don't hesitate to reach out to us.