Hello.
I'm currently running HAProxy ( 1.4.8) with a couple of servers. The first
problem was concerned statistics page. Sometimes reguests were directly
forworded to servers instead of being processed by HAProxy. The solution was to
enable httpclose option. Then another problem showed up. I noticed that
sessions were no longer persistent to servers. Below is my config.
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
# log loghost local0 info
maxconn 4096
# chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
# debug
# quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen webfarm 192.168.12.10:80
# mode http
stats enable
stats hide-version
stats show-node
balance roundrobin
# cookie JSESSIONID prefix
option httpclose
# option forwardfor
# option httpchk HEAD /haproxytest.txt HTTP/1.0
appsession PHPSESSID len 64 timeout 3h
server srv1 192.168.12.20:80 check
server srv2 192.168.12.30:80 check
server srv3 192.168.12.40:80 check
Is my configuration correct?
The goal I want to achieve is to bind client to one server once the session
gets started by passively listening for cookies in headers. I feel a little bit
lost how many options HAProxy offers for cookie stickiness (appsession, cookie,
cookie in server command, capture cookie, stick match), so can you give me a
piece of advice what option is best for my configuration?
Thanks in advance.
Best regards,
Mr. Ripley
----------------------------------------------------------------
Mozesz kupic dom juz nawet za 120 tys. zl
Sprawdz >> http://linkint.pl/f2937