views:

2191

answers:

1

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.

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.

# 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
+1  A: 

Then if it does not matter which server serves the request, disable stickiness and remove the appsession line. You must understand that stickiness is the opposite of load-balancing. If your issue is that you don't scale, don't stick first.

Willy Tarreau
I resolved that problem basically my load generation script was wrong. I have another question. "appsession" is the way to do sticky session or by using "cookie SERVERID insert nocache". Second one worked perfectly but first on seems more simple and elegent way but did not workThanks for the wonderful product. Its awsomee I had to work on it a bit but after that it worked perfectly.
tushar Khairnar