6 Replies Latest reply on May 20, 2016 11:26 AM by rhusar

    Clustering + load balance strangeness on WF 10

    nickarls

      I'm using Clustering and Domain Setup Walkthrough - WildFly 10 - Project Documentation Editor and I've set up two WF10:s that appear to be hooked up (I deployed to the cluster and the app got deployed to both nodes etc).

       

      Then I followed Using Wildfly as a Load Balancer - WildFly 10 - Project Documentation Editor and when I access the /cluster-demo on the loadbalancer and refresh, I see the requests distributed between the nodes. However, if I try the put.jsp and then try the get.jsp, I always get the result "null" even if I hit the server that got the put.jsp. If I go directly to the node context-roots, both put.jsp and get.jsp works. My loadbalancer conf is

       

      undertow/default-server/default-host <location name="/cluster-demo" handler="my-handler"/>

       

      handlers/

       

      <reverse-proxy name="my-handler">

      <host name="node1" o-s-b="node1", scheme="ajp", path="/cluster-demo" instance-id="myroute"/>

      <host name="node2" o-s-b="node2", scheme="ajp", path="/cluster-demo" instance-id="myroute"/>

      </reverse-proxy>

       

      socket-binding-group (standard-sockets)

       

      <o-s-b name="node1">

        <r-d host="node1.ip.addr" port="8259"/>

      </o-s-b>

      <o-s-b name="node2">

        <r-d host="node2.ip.addr" port="8259"/>

      </o-s-b>

       

      (both have port-offset 250)

       

      Something I misunderstood?

       

      Thanks in advance

      Nik

        • 1. Re: Clustering + load balance strangeness on WF 10
          ctomc

          you are running standalone-ha.xml or standalone-full-ha.xml for the backend nodes?

           

          as configuring undertow to do load balancing between two nodes, doesn't imply proper cluster replication between that two nodes.

          • 2. Re: Clustering + load balance strangeness on WF 10
            nickarls

            I just ran them with domain.bat. Can the distributed deployment work without replication working?

            • 3. Re: Clustering + load balance strangeness on WF 10
              nickarls

              It indeed appears to be some problem with the replication since running the put.jsp directly on master and then the get.jsp on the slave, I also get "null".

              Strange. The web.xml has the distributable tag and deploying the application from the master console deployed it also to the slave. And I see the slave and master connecting. And in domain.xml I see

               

                     <server-group name="other-server-group" profile="full-ha">

                          <jvm name="default">

                              <heap size="64m" max-size="512m"/>

                          </jvm>

                          <socket-binding-group ref="full-ha-sockets"/>

                          <deployments>

                              <deployment name="cluster-demo.war" runtime-name="cluster-demo.war"/>

                          </deployments>

                      </server-group>

              • 4. Re: Clustering + load balance strangeness on WF 10
                rhusar

                To debug, you can run the app we use to test the server, checkout

                 

                https://github.com/clusterbench/clusterbench

                 

                deploy and when you hit

                 

                http://localhost:8080/clusterbench/debug

                or

                http://localhost:8180/clusterbench/debug (second server with offset 100)

                 

                you should see the members for the cache:

                 

                Serial: 13

                Session ID: eh5srCB4fxlhI3GLwwMthGhFzWoybp3EGe6PqYd-

                Current time: Fri May 20 12:04:43 CEST 2016

                ServletRequest.getServerPort(): 8080

                ServletRequest.getLocalPort(): 8080

                Node name: node1

                Members: [node1, node2]

                Physical addresses: 127.0.0.1:55200; 127.0.0.1:55300;

                 

                I dono if that would be useful, but I cannot vouch for the app you are using what it does.

                • 5. Re: Clustering + load balance strangeness on WF 10
                  nickarls

                  I have three servers on master and three servers on slave. If I hit any of the servers on the master, I see the three nodes on the master and the same thing with the slave host but for some reason they are not all visible in the same server group. The output of the debug servlet config this, if I use "put.jsp" on any on the master nodes, "get.jsp" on another node will see the value but no servers on the slave node will see the value. However, looking at the server group on the master web console will show all six nodes in the group...

                   

                  Any pointers?

                  • 6. Re: Clustering + load balance strangeness on WF 10
                    rhusar

                    Ok and while accessing the /debug servlet, you see:

                     

                    1. counter increasing by 1 with every invocation
                    2. session ID stays the same
                    3. members always include all expected members

                     

                    ?