Thank you *VERY* much for this tidbit Nenad.
With the early version of HAProxy we're using (v1.3.18) the actual syntax
is:
option httpclose
This worked perfectly, session afinity started performing as expected.
(Just wanted to record this for posterity)
-Chris
On Fri, Jun 14, 2013 at 5:39 PM, Nenad Merdanovic ni...@nimzo.info wrote:
Hello Chris,
You are missing one of the options to tell HAproxy to examine every
request and not just first one for each connection.
Add this to the defaults section:
option http-server-close (or httpclose/forceclose, whatever suits you)
timeout http-keep-alive 5s (for example, tune to your needs)
Regards,
Nenad
On 06/14/2013 11:28 PM, Chris Patti wrote:
Hello, we have two machines with identical haproxy configurations, set
up to load balance each other, with Tomcat on the back end.
We're seeing the SERVERID cookie only being set intermittently, despite
the fact that as per our understanding it should be set with every
response.
When the cookie is NOT set, the request isn't printed when haproxy is
running in debug mode, and the backend Total Sessions doesn't
increment on the status page.
Here's our configuration, we'd sincerely appreciate any hints anyone may
have.
Thanks,
-Chris
-
global
log 127.0.0.1 local2 info
maxconn 4096
ulimit-n 8250
chroot /home/haproxy
user haproxy
group haproxy
daemon
quiet
pidfile /home/haproxy/haproxy.pid
defaults
log global
modehttp
option httplog
option dontlognull
retries 3
redispatch
maxconn 2000
contimeout 5000
clitimeout 6
srvtimeout 6
stats uri /gz-haproxy-status
120
cookie SERVERID insert indirect nocache
no option transparent
frontend haproxy *:85
default_backend tomcat
backend tomcat
balance roundrobin
option httpchk GET /warehouse/static/images/gazelle_logo_tm.png
server stg_wh_1 10.94.246.222:8181 http://10.94.246.222:8181 cookie
i-9b333efb check inter 9000 ri
se 2 fall 3 port 8181 maxconn 1000
server stg_wh_2 10.223.37.147:8181 http://10.223.37.147:8181 cookie
i-73b5be11 check inter 9000 ri
se 2 fall 3 port 8181 maxconn 10
--
Nenad Merdanovic | PGP: 0x423edcb2 | Web: http://nimzo.info
Linkedin: http://www.linkedin.com/in/nenadmerdanovic