0 Replies Latest reply on Oct 26, 2017 9:42 AM by rajashekar.rratna

    Sticky session is not maintained when bringing back previous server up

    rajashekar.rratna

      I've have set up a  cluster with 4 wildfly nodes and apache mod_cluster acting as the load balancer. Session replication & session stickiness are enabled in this setup.

       

      Assume wildfly node ids are

      node-01

      node-02

      node-03

      node-04

       

      I've been testing multiple scenarios to check if the session replication & stickiness are working as expected. But encountered a strange issue.

       

      Here goes my problem.

       

      1. The first request from client went to node 1. In the cookies, I can see the JSession id coming as sessionId.node-01.

      2. Few more requests from client and the session is sticking to node-01.

      3. Brought down node-01. Apache forwarded the request to node-02.

      4. I can see the JSession id coming as sessionId.node-02. Sent few more requests  and session is sticking to node-01.

      5. Brought down node-02. Apache forwarded the request to node-03

      6. I can see the JSession id coming as sessionId.node-03. Sent few more requests  and session is sticking to node-03.

      6. Brought down node-03. Apache forwarded the request to the only availble node-04

      7. I can see the JSession id coming as sessionId.node-04.

       

      So now the problem starts

       

      8. I brought up the node-03 (which was brought down last) and the next request, instead of sticking to node-04, went to node-03 and contniued there for subsequent requests.

      9. Now I brought up the node-02 and the next request instead of sticking to node-03, went to node-02 and contniued there for subsequent requests.

       

      I want to know Is this expected behaviour or if there is a configuration that will control this behaviour?

       

      We are using Wildfly 10.1, mod_cluster 1.3.1.

       

      Thanks