title: HAProxy balancer using the url_param value?
body: <p>All!</p>
  
  <p>I have 3 different restful servers: w1, w2, w3</p>
  
  <p>My clients that refer to my load balancer are providing the url parameter called "ip" (ipv4). The url parameter ip is different between a requests:</p>
  
  <pre><code>curl -XGET http://localhost:8080/api/v1/link?ip=x.x.x.x
  </code></pre>
  
  <p>I would like to balance with HAProxy to w1, w2, w3 according to the ip parameter using HASH algo.</p>
  
  <p>HAProxy configuration below:</p>
  
  <pre><code>global
      #daemon
      maxconn 3000
  
  defaults
      mode http
      timeout connect 5000ms
      timeout client 50000ms
      timeout server 50000ms
  
  frontend http-in
      bind *:80
      default_backend workers
  
  backend workers
      balance url_param ip
      hash-type consistent
      server w1 localhost:8080 weight 1 maxconn 1000 check
      server w2 localhost:8081 weight 1 maxconn 1000 check
      server w3 localhost:8082 weight 1 maxconn 1000 check
  
  listen admin
      bind *:8088
      stats hide-version
      stats realm HAProxy\ statistics
      stats enable
  </code></pre>
  
  <p>How can i achieve that?</p>
  
  <p>Thanks</p>