Search code examples
jbossmod-cluster

Wildfly 9 Load-Balancing


I have two Wildfly 9 nodes running in standalone mode.

192.168.1.34 - node1 - Listening on 8080
192.168.1.35 - node2 - Listening on 8080

192.168.1.33 - myserver - Listening on 8080

I want to load-balance between the two nodes so that requests coming into myserver get split between the two nodes. I'm new to Wildfly but I see many references to built-in mod_cluster.

What is the simplest way to load-balance between multiple JBoss nodes?


Solution

  • I suggest to use Undertow as a loadbalancer for WildFly 9. Undertow is a new web server in WildFly. The advantage is, you don't need to play with native components (Apache httpd for instance) and their (usually not so simple) configuration.

    Read about the loadbalancer configuration in WildFly documentation.

    Or just watch following video, where Stuart Douglas (Undertow developer) explains how it works and makes live demo.