title: How to do sticky load-balancing with HAProxy with Session transfer to new servers
body: <p>I am using appsession config element for sticky session. I have 5 weblogic instances 3 of them are active and serving load now when load increases i start additional 2 instances. Now HAProxy marks them "Helthy" but does not transfer any traffic to it because it sticky.</p>
  
  <p>How do I transfer existing sessions to new weblogic servers. I am using Terracotta for session clustering so it does not matter which server is serving the request. Below is my config for HAProxy.</p>
  
  <pre><code># this config needs haproxy-1.1.28 or haproxy-1.2.1
  
  global
        log 127.0.0.1   local0
        maxconn 1024
        daemon
       # debug
        #quiet
  
  defaults
        log     global
        mode    http
        option  httplog
        option  httpchk
        option  httpclose
        retries 3
        option redispatch
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000
        stats uri /admin?stats
        stats refresh 5s
  
  listen  terracotta 0.0.0.0:10001
  #     balance url_param JSESSIONID
        balance roundrobin
        option httpchk OPTIONS /Townsend
        server  L1_1 10.211.55.1:7003  check
        server  L1_2 10.211.55.2:7004  check
     server  L1_3 10.211.55.3:7004  check
        appsession JSESSIONID len 52 timeout 3h
  </code></pre>