Hi guys, Here is the access log for this bug.
Nov 12 07:16:43 localhost haproxy[18627]: 123.117.167.107:30281[12/Nov/2010:07:16:43.109] http_proxy http_proxy/server2 0/0/0/109/618 200 2505 - JSESSIONID=abciT3I4wOv6YfMmpQaXs.1 --NI 0/0/0/0/0 0/0 "GET /wap2/login.jsp HTTP/1.1" Nov 12 07:16:48 localhost haproxy[18626]: 123.117.167.107:30291[12/Nov/2010:07:16:47.634] http_proxy http_proxy/server1 0/0/0/473/997 200 1621 - JSESSIONID=abc_LqOuNI2_ldhwqQaXs.1 --NI 0/0/0/0/0 0/0 "POST /wap2/j_security_check;jsessionid=abciT3I4wOv6YfMmpQaXs.1 HTTP/1.1" Nov 12 07:16:55 localhost haproxy[18627]: 123.117.167.107:30372[12/Nov/2010:07:16:53.452] http_proxy http_proxy/server1 0/0/0/1305/1836 200 2558 - - --NI 0/0/0/0/0 0/0 "GET /wap2/checklist_skip.do; jsessionid=abc_LqOuNI2_ldhwqQaXs.1?n=1&s=XlJdEHFYXUpXbEYIT2xNBhtFBEoVF0cHWx9bGEMR HTTP/1.1" Nov 12 07:17:04 localhost haproxy[18627]: 123.117.167.107:30452[12/Nov/2010:07:17:04.032] http_proxy http_proxy/server2 0/0/0/356/863 200 2672 - JSESSIONID=abc4JPQflUaXrbKuuQaXs.1 --NI 0/0/0/0/0 0/0 "GET /wap2/profileViewWithCoinsReloadCheck.do;jsessionid=abc_LqOuNI2_ldhwqQaXs.1?n=6&s=XlJdEHFYXUpXbEYIT2xNBhtFBEoVF0cHWx9bGEMR HTTP/1.1" At the last line, when I access the page with jsessionid=abc_LqOuNI2_ldhwqQaXs.1, The haproxy give me an new JSESSIONID. It is not correct because I use the old session just for several seconds and it should not be timeout. Best Regards, Hogan On Fri, Nov 12, 2010 at 11:16 PM, Hogan Yu <[email protected]>wrote: > Hi guys, > I am very interesting about the haproxy and try to use it as our load > balancer. I want to use the appsession as the persistence method. but I got > a big problem that when I disable the cookie in browser. It will lost the > persistence and send me to another server sometimes. > I install it by on our 8 core, X86_64 server with RedHat 5.5 > > make TARGET=linux26 ARCH=x86_64 > make install. > > Here is my configuration for the haproxy.cfg file: > > > ------------------------------------------------------------------------------------ > lobal > maxconn 32000 # Total Max Connections. This is dependent on > ulimit > daemon > nbproc 3 # Number of processing cores. Dual Dual-core Opteron > is 4 cores for example. > pidfile /tmp/haproxy.pid > #stats maxconn 5 > defaults > mode http > clitimeout 10000 > srvtimeout 10000 > contimeout 10000 > #option httpclose # Disable Keepalive > > log global > log 127.0.0.1 local3 > option httplog > > > listen http_proxy 10.211.162.15:80 > balance roundrobin # Load Balancing algorithm > option httpchk HEAD /status.jsp HTTP/1.0 > option forwardfor # This sets X-Forwarded-For > stats enable > stats realm icebreakersoftware\ Haproxy > stats uri /admin > stats auth wade:wade > stats refresh 30s > stats hide-version > #option httpclose > capture cookie JSESSIONID len 52 > #stick-table type string len 52 size 2g expire 1h > cookie HTTPSERVERID insert nocache indirect > #appsession JSESSIONID len 52 timeout 3h mode query-string > appsession JSESSIONID len 34 timeout 1h > #option ignore-persist if url_end .jpg > ## Define your servers to balance > server server1 10.211.162.15:8280 weight 1 maxconn 15000 check > inter 2000 rise 2 fall 3 cookie A > server server2 10.198.9.139:8280 weight 1 maxconn 15000 check > inter 2000 rise 2 fall 3 cookie B > > ------------------------------------------------------------------------------------ > > Even I disable the line: > #cookie HTTPSERVERID insert nocache indirect > > > > does my configuration is correct about the appsession? > > > Best Regards, > > > Hogan > > -- Hogan Yu Technical Operations Director Ice BreakerSoftware (Beijing) Lmt. Mobile: 18611746815 Tel:86-10-82800259 82800942 Fax:86-10-82800941

