Wildfly 10 mod_cluster load balancer discovers too many hosts
matt_smith Dec 21, 2016 8:32 PMHi all,
I am working with an environment that has many Wildfly 8 and 9 servers deployed, mostly running in standalone-ha mode. These servers are organised into several different clusters, hosting many applications. Users currently access the applications via a HTTPd reverse proxy. I am working on replacing HTTPd with Wildfly 10, leveraging modcluster. I unpacked the 10.1.0 package, swapped to the standalone-ha config, and launched it. I ran the following config commands in the console:
/interface=public:write-attribute(name=inet-address, value=10.0.0.237)
/socket-binding-group=standard-sockets/socket-binding=modcluster:write-attribute(name=multicast-address, value=239.239.99.254)
/subsystem=undertow/configuration=filter/mod-cluster=modcluster:add(management-socket-binding=http, advertise-socket-binding=modcluster)
/subsystem=undertow/server=default-server/host=default-host/filter-ref=modcluster:add
:reload
All of the existing Wildfly servers have their modcluster multicast address set to the default value of 224.0.1.105. When I reload the server I get:
MODCLUSTER000001: Initializing mod_cluster version 1.3.3.Final
MODCLUSTER000032: Listening to proxy advertisements on /239.239.99.254:23364
...
Registering node backend-node, connection: ajp://0.0.0.0:8109/?#
Registering context /app1, for node backend-node
Registering context /app2, for node backend-node
...
It registers many servers, pretty much all of them I think. I know there is a setting on the modcluster subsystem to disable advertising but my understanding is that that only affects the client (i.e. when that instance is the backend server). The undertow filter doesn't seem to have a corresponding setting to disable advertising when that instance is the load balancer. If I leave the load balancer running it continually registers and unregisters all of the backend servers, and trying to access any apps in the browser via the load balancer times out.
On the backend node I see this message repeated in the logs:
MODCLUSTER000001: Initializing mod_cluster version 1.3.1.Final
MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
...
MODCLUSTER000042: Error null sending INFO command to lb-node/10.0.0.237:8080, configuration will be reset: null
So two questions:
- Why is the load balancer discovering all of those hosts automatically when they shouldn't be able to see the advertising messages?
- How can I stop the load balancer from advertising itself (effectively forcing the backend servers to manually register via explicit configuration)?
Thanks in advance!
Matt
-
standalone-ha.xml.zip 4.8 KB