Docker Community Forums

Share and learn in the Docker community.

Docker swarm service and session stickyness


(Smajeti) #1

Hi All,
I have just started using docker swarm service on a web application that exposes only https/8443. I am able to see round robin working as i have 3 replicas and i get login prompts for the first time as it shifts to next server for each login i do. But this login thing is going on going on and never ends. So I am not sure if session stickyness really working or not for same user if logs in again. We are doing some POC and really wanted some quick help on this.

Thanks and Regards,
Majeti.


(Tomasz Korwel) #2

Most likely you are overwriting session ID in cookie every time you log in in new node, hence never ending login loop. For session persistence I’d suggest offloading it to some kind of centralized storage place (can be nfs share mounted on all replicas, or maybe db based) that way every replica can get session data from the id identified by your cookie.


(Smajeti) #3

Thank you very much for the suggestion. Let me give a try.