We are glad to share our next achievement: now
Jelastic provides the ability to use session replication between application servers. It is very simple to turn on replication - just one click and you are the owner of High Availability (HA) environments. Let's take a closer look at how it works and what benefits you get.

In the current solution, Jelastic configures session replication between pairs of servers. These pairs form clusters.
When the user first accesses the application, the balancer forwards the request to one of the instances in one of the clusters.
During the session, the user continues to work with the same instance (the so-called Sticky Sessions work). If one of the instances falls, user requests that were processed in it are automatically transferred to the other instance of the same cluster. Thanks to replication, the second instance already has all the sessions of the fallen “colleagues”, so the end users will not notice anything at all.
Of course, vertical scaling in Jelastic fits perfectly into this “game of sessions” - the above instance gets memory and CPU according to double load if necessary.
')
It is very unlikely that both instances in a cluster will fall, but still we have provided for this option. In this case, all users are redirected to another cluster. Of course, at the same time, the old sessions will not be replicated, but nevertheless the application will handle user requests.
Setting up such a manual replication mechanism is quite difficult, fraught with errors and loss of time. Moreover, not all programmers like to constantly engage in server settings. Jelastic automates this process for all supported servers (
Tomcat ,
GlassFish and
Jetty ).
How to set up session replication in Jelastic?
Easy peasy:
- When creating an environment in the Environment topology window, select the server type and the number of instances, then turn on HA (high availability).

- In a few minutes your environment will be created, with replication mode enabled.

Everything! This is all that is required. Quick and easy. You can also add HA to an environment that has already been created. Replication can be turned on and off whenever you want.
Future plans
In the future we plan to implement another popular approach to support High Availability - session replication between all environment instances using In-Memory Key-Value storages (for example, Memcache) to store sessions.
Try our new feature on
Jelastic.com and share your impressions
@jelastic !