8 Replies Latest reply on Jan 11, 2014 12:29 PM by Gert Kropiunik

    Clustering with CachedAuthenticatedSessionMechanism

    Gert Kropiunik Newbie

      Hi,

       

      I am trying to get session clustering with wildfly.Beta1 and FORM based authentication working in my web application. I am using the standalone-full-ha config to start my server. I am also using sticky sessions on my load balancer and everything works perfect as long as all cluster nodes are online.

       

      When the node currently serving the sticky session is stopped I am facing problems when the session fails over to another node in the cluster. I am redirected to the login page again on the other node although I was already logged in successfully.

       

      After some hours of debugging I have found the following JIRA issue WFLY-1910 that includes a pull request from which I can guess that the java/org/wildfly/clustering/web/undertow/session/SessionAdapter has a special treatment for already authenticated sessions so that the authentication information is not replicated among all cluster nodes because it is held in a local context. All other session attributes are replicated on the other cluster nodes without any problem.

       

      Now my question is how to prevent users from having to re-login after a clustered session failover. I think it should have worked before the fix of WFLY-1910 but what is the suggested approach now.

       

      Cheers, Gert