title: Load balancing among multiple instances of a backend application
body: <p>I have a java based client application that wants to talk to multiple instances of  a legacy backend application, using "<strong>some</strong>" load balancing strategy. The instances' details (IP, PORT &amp; Active?) of this back-end application are stored in a DB table. For a given instance, the client application makes a socket connection, sends commands and receives response. These socket connections are long-lived. </p>
  
  <p>To be able to utilize all of the available instances, I am planning to do the following in client:</p>
  
  <ol>
  <li>Read the healthy instances to a map </li>
  <li>Open connections or use existing Socket connections in a round-robin fashion </li>
  <li>Send request on a given socket connection. If the request fails, then mark this instance as unhealthy so that
  it will not be picked up again. Also retry the request on another
  connection  </li>
  <li>In a worker thread periodically update the map from # 1</li>
  </ol>
  
  <p>Are there any tools/libraries available to achieve this? Apache Camel came up in Google search (also Ribbon and Hystrix), but I am not entirely sure how I can fit it in this scenario. Please help. </p>