DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. New in Jelastic PaaS: session replication and sticky sessions

New in Jelastic PaaS: session replication and sticky sessions

Ruslan Synytsky user avatar by
Ruslan Synytsky
·
Dec. 15, 11 · Interview
Like (0)
Save
Tweet
Share
11.27K Views

Join the DZone community and get the full member experience.

Join For Free

here are some details on how the high availability features that we added few days ago work. this boils down to properly setting up session replication between tomcat , glassfish and jetty web servers in jelastic and configuring load balancer redirecting requests to them. session replication then keeps copying session data between server instances thus providing high reliability, scalability, and perfect failover capabilities.

here's how it works:

jelastic sets replication between pairs of application servers using multicast replication; these pairs form clusters.

when a user makes the first request to the web application balancer ( nginx ), it redirects the request to one of the clusters. throughout the session the 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 of the sessions.

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.

obviously jelastic's vertical scaling comes into the game nicely - the remaining server instance also gets the memory and processing power required to serve the doubled load.

in the highly unlikely event of both instances in a cluster failing, users get redirected to another cluster.

setting up that kind of high availability manually is possible but is quite difficult and error prone. jelastic automates the configuration and does so for all java application servers it supports (currently tomcat , glassfish and jetty .)

here's how you set up session replication in jelastic :
  1. go to jelastic.com and sign up if you haven't done it yet or log in with your jelastic credentials by clicking the sign in link on the page.
  2. in jelastic , click the create environment to create a new environment (you can also switch high availability on for existing environments by opening their topology configuration).
  1. in the environment topology window pick the number and kind of application servers that you need and enable the ha (high availability) mode by clicking the control to the right of the application servers.
  1. in a minute or so your environment will be successfully created (or updated) with replication enabled in it.

as we mentioned, you can turn replication on or off whenever you want - jelastic can reconfigure existing environments just fine.

try the new feature at jelastic.com and let us know what you think!
Session (web analytics) Replication (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Container Security: Don't Let Your Guard Down
  • Steel Threads Are a Technique That Will Make You a Better Engineer
  • Building a Real-Time App With Spring Boot, Cassandra, Pulsar, React, and Hilla
  • Real-Time Analytics for IoT

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: