title: HA Proxy Prioritized Connections
body: <p>I am using HAProxy and I have been trying to set it up to work a certain way.
  I want it so that if server 11.111.11.110 connects then it will always hit ABC_server01 unless that server is offline.</p>
  
  <p>However this is how I have it currently written using weights:</p>
  
  <pre><code>acl the_workstation src 11.111.11.110
  use_backend ABC if the_workstation
  
  backend ABC
    server ABC_server01 22.222.22.220:443 weight 255 maxconn 512 check
    server ABC_server02 33.333.33.333:443 weight 1 maxconn 512 check
    server ABC_server03 44.444.44.444:443 weight 1 maxconn 512 check
  </code></pre>
  
  <p>With what is written up top I believe that in 257 connection attempts 2 will not use ABC_server01. </p>
  
  <p>I looked into if loops and timeouts however I was not able to come up with a working solution. 
  <a href="https://www.haproxy.org/coding-style.html" rel="nofollow noreferrer">https://www.haproxy.org/coding-style.html</a>
  <a href="http://www.haproxy.org/download/1.5/doc/configuration.txt" rel="nofollow noreferrer">http://www.haproxy.org/download/1.5/doc/configuration.txt</a></p>
  
  <p>Does anyone know a simple way to make it prioritize connection to a server then use the other remaining servers if the connection fais?</p>
  
  <p>This is the current version of HA Proxy I am using "HA-Proxy version 1.5.18 2016/05/10"</p>