title: Java Load Balancing Options
body: <p>Rather than reinvent the wheel, I'd like to utilize an open source load balancer for my Java backend. I'll be using GlassFish as the app server (running an <code>EAR</code>), and each app server will most likely be running on an Ubuntu Server VM.</p>
  
  <p><img src="https://i.stack.imgur.com/1twSX.jpg" alt="enter image description here"></p>
  
  <p>So the load balancer will <em>probably</em> (although I'm open for other ideas!) be its own Ubuntu Server VM running some sort of open source load balancing software. As to what this is (please note the big "<code>?</code>" in the diagram!) I don't really care so long as it:</p>
  
  <ul>
  <li>Is super fast</li>
  <li>Is secure</li>
  <li>Plays nice with GlassFish</li>
  <li>Is free and open source and comes with a license that doesn't restrict me from selling this system as a product or service</li>
  <li>Is <em>relatively</em> easy to configure (but I'm not scared do get my hands dirty)</li>
  </ul>
  
  <p>Just wondering what my (best) options were. So far I've scouted out:</p>
  
  <ul>
  <li>Apache <code>HTTPd</code></li>
  <li>haproxy</li>
  <li>nginx</li>
  </ul>
  
  <p>But nothing is blowing my doors down as being the end-all-be-all-obvious-solution to my requirements. Thanks in advance for any suggestions or nudges in the right direction!</p>