title: Wildfly load-balancing across multiple machines
body: <p>I am trying to configure a wildfly server with a load balancer for learning purposes. Here's what I got:</p>
  
  <ul>
  <li>Three VMs, only accessible by their IPs.
  
  <ul>
  <li>One is 152.238.224.58 - my load balancer</li>
  <li>An other one is 152.238.224.59 - my first backend server</li>
  <li>The last one is 152.238.224.60 - my second backend server</li>
  </ul></li>
  </ul>
  
  <p>I find the wildfly documentation to be rather poor, but after watching <a href="https://www.youtube.com/watch?v=xa_gtRDpwyQ" rel="nofollow noreferrer">Stuart Douglas's explanation</a> on how the load balancer works, I currently have my first VM running a cluster of servers. Load balancing works, but everything is on the same VM (the first one). What I'd rather have is the load balancer acting as a proxy for the two backend servers.</p>
  
  <p>I've tried the method described on the <a href="https://docs.jboss.org/author/display/WFLY9/Using+Wildfly+as+a+Load+Balancer?_sscc=t" rel="nofollow noreferrer">Wildfly documentation</a> but didn't manage to make it work. </p>
  
  <p>What would I need to do to have the first VM load-balancing across the two second VMs? To go even further, how difficult would it be to have the first VM act as a load-balancer between VM-2 and VM-3, where VM-2 and VM-3 are clusters (would they then have their own load-balancer?)?</p>
  
  <p>Thanks a lot for any indication.</p>