I have one Java based web application which is deployed in jboss-10.1.0(wildfly)
. I am using docker swarm mode(docker version 1.12.1
) to scale my application everything works perfectly but the only issue I am facing is session management.
Now let's take scenario.
I have two instance is running for my application(i.e. App1
and App2
).I am using default load balancer provided by docker swarm mode with nginx
to redirect my application from chintan.test.com:9080
to chintan.test.com:80
so that I don't need to write down port with my url and I am able to access directly with this URL chintan.test.com
.
Now the default load balancer is using RR(Round-Robin algorithm
) to serve my web request.So first time I visit the chintan.test.com
it goes to App1
instance and display login page I login with credentials and everything works perfectly after few minutes it's switch to App2
and again the login page comes.
Is there any way or tools(should be Open-source) through which I handle sessions ? So at least I login to App1
and stick to App1
until I logout.
Thank you!