I am trying to set up a domain with a load balancer and two worker instances on the same host for testing purposes.
According to WildFly 10.1 is now available! · WildFly,
'You can now build a fully clustered topology using just our default profiles in domain mode, creating a server with the "load-balancer" profile, and a set of backend servers using the "full-ha" profile."
It does not mention anything about the number of hosts, so I am trying to see if this works on a single host, i.e. master.
I followed a tutorial by karm over at Undertow mod_cluster proxy: Basic setup in Wildfly 10 - asciinema and was able to set up a similar scenario using 3 standalone instances on a single machine, where one acts as mod-cluster balancer. But since domain mode already has the load-balancer profile, I figured it would be easy to do in domain mode.
I downloaded Wildfly 10.1, started up the domain and removed default server groups from the domain.
I created a lb-group, with load-balancer profile and load-balancer-sockets, as well as app-nodes group, with full-ha profile and full-ha-sockets.
I then created a load-balancer server in lb-group with port offset of 0.
In app-nodes group, I created two worker instances, server-one and server-two with port offsets of 100 and 200, respectively.
I deployed a sample.war and assigned it to app-nodes group. I can access http://localhost:8180/sample and http://localhost:8280/sample fine, but when I try to use the load balancer, http://localhost:8080/sample, I get a 404 error.
Log messages relating to modcluster on load-balancer instance:
Undertow starts mod_cluster proxy advertisements on /22.214.171.124:23364 with frequency 10000 ms
and on app-nodes instances:
INFO [org.jboss.modcluster] (ServerService Thread Pool -- 69) MODCLUSTER000001: Initializing mod_cluster version 1.3.3.Final INFO [org.jboss.modcluster] (ServerService Thread Pool -- 69) MODCLUSTER000032: Listening to proxy advertisements on /126.96.36.199:23364
I tried different port offsets, as well as using ha-profile instead of full-ha for worker instances, but the result is the same.
How can I get this up and running? Any help is greatly appreciated.