Good day, I am a complete newby when it comes to setting up load balancing and have tried following the documentation available in order to setup and then hopefully get to understand what I am doing, but I am not able to get load balancing right...
I am trying to setup Wildfly 10.1.0.Final in as a standalone-full-ha "configuration" with load balancing support.
I have done the following:
1. Created a copy of the /standalone folder and now have /standalone1/ and /standalone2/ folders.
2. I then start the two server nodes with the following commands:
Srv 1: ./standalone.sh -server-config=standalone-full-ha.xml -Djboss.server.base.dir=$JBOSS_HOME/standalone1/ -Djboss.node.name=srv1
Srv 2: ./standalone.sh -server-config=standalone-full-ha.xml -Djboss.server.base.dir=$JBOSS_HOME/standalone2 -Djboss.node.name=srv2 -Djboss.socket.binding.port-offset=100
3. Then I followed the instructions from (Using Wildfly as a Load Balancer - WildFly 10 - Project Documentation Editor ) a little blind, and did the following:
3.1 From the jboss-cli.sh added a reverse proxy successfully with: /subsystem=undertow/configuration=handler/reverse-proxy=my-handler:add() (but this was only created in the config of srv1 (not sure if I need this on srv2 as well?? )
3.2 Then to define the outbound socket bindings (again this was only created in srv1's standalone-full-ha.xml):
3.3 And than added them as hosts to reverse proxy handler:
/subsystem=undertow/configuration=handler/reverse-proxy=my-handler/host=host1:add(outbound-socket-binding=remote-host1, scheme=ajp, instance-id=myroute1, path=/)
/subsystem=undertow/configuration=handler/reverse-proxy=my-handler/host=host2:add(outbound-socket-binding=remote-host2, scheme=ajp, instance-id=myroute2, path=/)
(Is path suppose to be something specific and what about myroute1 and myroute2? What do these refer to?)
3.4 Then lastly, I ran the command:
(I deployed the test application"magellan" to both servers successfully) -> magellan project from: Release Magellan 1.0 · giancosta86/magellan · GitHub
The application deployed successfully and I was able to access the application on both servers from:
And although it seems like the session replication "test" worked well (using the counter on the magellan application), I was not able to enable the load balance test. By stopping for example srv1 I was not able to access the application on 8080 anymore and visa-versa. What am I missing from my configuration?
From the documentation on Using Wildfly as Load Balancer I was under the impression that somehow, http://localhost:8080/magellan/ would now serve up proxied content which in tern would mean that I could stop either server and the site would still be accessible. Is this assumption correct?