1 Reply Latest reply on Jan 3, 2012 6:51 AM by erhard

    Sticky session not sticky after failover?

    erhard

      Hi,

       

      Same setup as in http://community.jboss.org/message/643850 with mod_cluster and 3 JBoss 4 as backend. A client with sticky session. When I shutdown the server with the active session, the session flips between server two and server three. When server one comes up again, the session stays with server one:

       

      ./democlient.py http://devjava/demo/

      0 unknown

      Switch to node cluster1

      1 cluster1

      2 cluster1

      3 cluster1

      4 cluster1

      5 cluster1

      6 cluster1 Here I shut down server one

      Switch to node cluster2

      7 cluster2

      Switch to node cluster3

      8 cluster3

      Switch to node cluster2

      9 cluster2

      Switch to node cluster3

      10 cluster3

      Switch to node cluster2

      11 cluster2

      Switch to node cluster3

      12 cluster3

      Switch to node cluster2

      13 cluster2

      Switch to node cluster3

      14 cluster3

      ...

      Switch to node cluster2

      63 cluster2

      64 cluster2

      Switch to node cluster1 Server one was started

      65 cluster1

      66 cluster1

      67 cluster1

      68 cluster1

      69 cluster1

      70 cluster1

      71 cluster1

      72 cluster1

       

      I would have expected, that the session (requests) stay with one server after the switch and dosn't toggle between server two and three.

      Also I expected that the session stays with server two or three after the server one comes up again. What is the intended behavior?

       

      Please note that the behavior might have to to with my patches in http://community.jboss.org/message/643850. I will try again when these are fixed, but I think the question is still valid.

       

      Erhard

        • 1. Re: Sticky session not sticky after failover?
          erhard

          The problems from http://community.jboss.org/message/643850 are solved by setting stickySessionForce = false. Still the same toggeling after the first switch. Is it a bug, a feature or a misconfiguration?

           

          Background is that I want to deploy new versions of an application without interrupt for the user. This is my main usecase for the cluster. Therefore I would use sticky-session an async replication. When I shut down one JBoss, the second or the third JBoss should take over and keep the session. I don't like the toggling since I fear the async replication with this. When the first JBoss comes up after deployment, I think it would be better when only the new sessions go to the new version of the application, because I would like the user to stay with one version of the application if possible. Therefore I think it would be better when the session keeps on the other JBoss in this case as well. Any thoughts on this?

           

          Erhard