-
1. Re: How to configure undertow as a loadBalancer ?
jokser Feb 24, 2015 8:31 AM (in response to abhinav.gupta01)1 of 1 people found this helpfulHi Abhinav,
I can't understand why you don't want use Apache as frontend balancer. It's good common practice. There is mod_cluster module for Apache which created for easy configuring load-balance between Jboss AS/Wildfly instances. In Wildfly mod cluster subsystem you can implement any load-balancing strategy. You can find detailed information and good examples in Wildfly guides. It's not as difficult as it seems.
In my understanding of master-slave architecture it's something like when you have 2 nodes master and slave. Master node consumes incoming requests while slave node "sleeps". When master node breaks slave node "wake ups" and starts to consume requests in place of master node. This behavior can be implemented using e.g. Linux Virtual Server.
And I strongly recommend you update Wildfly to 8.2 version or update Undertow to the latest release. Undertow version from WF 8.0 and 8.1 contains critical bug with AJP connector which used in communication between Apache and WF instances by default.
-
2. Re: How to configure undertow as a loadBalancer ?
abhinav.gupta01 Feb 24, 2015 9:27 AM (in response to jokser)Thanks. I will read more on mode_cluster and plan to upgrade to 8.2
Actually before WildFly we use WebLogic Server. In that our master node , redirect EJB calls to slave nodes. I was trying to keep it same in WildFly as well.
Also I read that WildFly 8.2 has Undertow reverse proxy configuration. Can I use to achieve same ? I am not sure how to configure that , didnt find any relevant examples as such.
If you are aware of this reverse proxy , please suggest.
-
3. Re: How to configure undertow as a loadBalancer ?
jokser Feb 24, 2015 12:32 PM (in response to abhinav.gupta01)1 of 1 people found this helpfulAbout clustered EJBs in Wildfly. You also don't need any reverse proxy and directly use Undertow. EJBs from different nodes automatically consolidate into one cluster when they are in the same server group. To lookup and invoke this EJBs from standalone client you need use jboss remote ejb client. One of the features of this client is you can know just one address of any node in your cluster. During communication process client retrieves cluster topology from this node so you can not worry about failover and you can implement any load-balancing strategy. All options are simply configured by .properties file. Moreover in Wildfly HTTP is used for remote ejb invocations, so you can just use your balancer address as remote EJB connection endpoint.
Here it's useful articles about this process:
http://blog.akquinet.de/2014/09/26/jboss-eap-wildfly-three-ways-to-invoke-remote-ejbs/
Also read Wildfly HA Guide section "Failover for clustered EJBs"
Hope it will be helpful for you.
-
4. Re: How to configure undertow as a loadBalancer ?
skull Feb 24, 2015 2:15 PM (in response to abhinav.gupta01)The master does not redirect, you will need a apache with mod_cluster to do your job.
I implemented this in our company and its works fine.
I dont have any tutorial in my hands, but if you want i can help.
-
5. Re: How to configure undertow as a loadBalancer ?
abhinav.gupta01 Feb 24, 2015 11:39 PM (in response to abhinav.gupta01)Thanks All.
I will work on to have a apache at front end. Will be back to you guys if stuck somewhere.