-
1. Re: Wildfly failover configuration with mod-cluster
rhusar Jun 11, 2014 7:04 AM (in response to jxavier)1 of 1 people found this helpful1. In mod-cluster configuration, how will detect my master/slave instances, because there is no such configs in VirtualHost file.
There is no such concept for mod_cluster. Master/slave or rather Domain controller/Host controller is a WildFly management concept.
You only have a httpd load-balancer that forwards request to the backend WildFly servers.
2. Is this configuration will work in AWS infrastructure
If you have already the load-balancer running, you are probably having issue with nodes finding each other. It uses UDP multicast by default, which does not work in AWS.
You would need to configure this statically using proxy-list attribute in mod_cluster subysstem configuration and input comma separated list (host:port) of the load-balancers to connect to.
-
2. Re: Wildfly failover configuration with mod-cluster
jxavier Jun 12, 2014 1:21 AM (in response to rhusar)Thanks Husar.
I'll explain here my desired architecture here.
I'm using Jboss in message queuing(ESB) flow, for HA, currently I'm using S3PING configuration with AWS Elastic Loadbalencer and this is working, but messages are flowing to both the nodes(instances) - active-active, both nodes are processing the request and making duplicates. So that I want to make Jboss configuration to active-passive, only one node should active and if that is failed other should come online. Followed this documentation - https://docs.jboss.org/display/WFLY8/WildFly+8+Cluster+Howto and configured except mod-cluster. Is this configuration will work in AWS? Can you please suggest a me any recommnded configuration?
-
3. Re: Wildfly failover configuration with mod-cluster
ctomc Jun 12, 2014 4:31 AM (in response to jxavier)Can you paste your apache's configuration? (host part, noting else)
you probably just need to configure sticky session with load balance factor to prefer master node
-
4. Re: Re: Wildfly failover configuration with mod-cluster
rhusar Jun 12, 2014 4:40 AM (in response to ctomc)Well if it's about the strict active/passive then that cannot be reliably provided by mod_cluster, but mod_jk supports this specific case using activation and redirect in case the node is down. Here is a configuration to achieve that:
# The advanced router LB worker worker.list=router worker.router.type=lb worker.router.balance_workers=worker1,worker2 # Define the first member worker worker.worker1.type=ajp13 worker.worker1.host=myhost1 worker.worker1.port=8009 # Define preferred failover node for worker1 worker.worker1.redirect=worker2 # Define the second member worker worker.worker2.type=ajp13 worker.worker2.host=myhost2 worker.worker2.port=8009 # Disable worker2 for all requests except failover worker.worker2.activation=disabled
-
5. Re: Re: Re: Wildfly failover configuration with mod-cluster
jxavier Jun 12, 2014 8:25 AM (in response to rhusar)Mod-cluster configuration working now - I made couple of changes in Jboss and mod-cluster VirtualHost file.
Jboss - Followed this - https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Configure_the_mod_cluster_Subsystem_to_Use_TCP.html
and configured proxy_list.
Mod-cluster - VirtualHost file -
<VirtualHost 10.1.128.58:6666>
<Directory />
Order deny,allow
#Deny from all
Allow from all
</Directory>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
EnableMCPMReceive
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Order deny,allow
#Deny from all
Allow from all
</Location>
ManagerBalancerName other-server-group
</VirtualHost>
</IfModule>
After this changes all looks good for me - deployed application is coming in - http://<mod-cluster-ip>:6666/cluster-demo/put.jsp .
I've some concern about this -
1. My expected configuration is active-passive (looks like its working), will it works as same?, if not, is there any way in mod-cluster to stick the session to one server until its getting an issue.
2. This configuration has one single point of failure, for some reason Domain controller down, cluster will not work. Is there any way to configure Domain controller in HA mode?