Re: Persistence Issue

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 11 Nov 2008 09:48:16 +0100


Hi,

On Sun, Nov 09, 2008 at 10:00:44PM -0500, Brenden Bixler wrote:
> Hello all.
>
> I am having a little trouble configuring HA-Proxy 1.2.17 on FreeBSD 7.
> Specifically, I want to enable persistence, so that once a request
> hits server A, all future requests during that session stay on server
> A.
>
> Server A is running FreeBSD 7, Apache 2x, Tomcat 6 using mod_jk on port 8080.
> Server B is running FreeBSD 7, Tomcat 6 standalone on 8081.
> I can go to either server via its IP Address and everything works as expected.
>
> My current config file:
>
> defaults
> log global
> mode http
>
> listen http_proxy
> bind :80
> mode http
> balance roundrobin
> cookie jSessionID prefix
> srvtimeout 10000
> retries 2
> option httpchk HEAD /sa
> server web1 XXX.XXX.XXX.XXX:8080 cookie server01 check
> server web2 YYY.YYY.YYY.YYY:8081 cookie server02 check
> redispatch

in cookie prefix mode, you should absolutely use "option httpclose", because haproxy must see and mangle all occurrences of the cookie in both directions.

It's possible that this will fix your problems.

Regards,
Willy Received on 2008/11/11 09:48

This archive was generated by hypermail 2.2.0 : 2008/11/11 10:00 CET