Re: Fwd: Very odd behavior with 'cookie' only working intermittently

2019-05-10 Thread Willy Tarreau
On Fri, May 10, 2019 at 10:53:07AM +0200, Willy Tarreau wrote:
> On Wed, Jun 26, 2013 at 12:10:27PM -0400, Chris Patti wrote:
(...)

Just noticed that a thread sorting issue on my side brought this very old
thread back and that this post is probably not interesting anymore to the
initial requester! Next time I'll check the date before responding.

Willy



Re: Fwd: Very odd behavior with 'cookie' only working intermittently

2019-05-10 Thread Willy Tarreau
On Wed, Jun 26, 2013 at 12:10:27PM -0400, Chris Patti wrote:
> 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)

Good catch indeed. Also this is not needed anymore starting from 1.4
(which supports keep-alive). And your version contains 73 known bugs
which were later fixed in 1.3.28. Note that the 1.3 branch is not
maintained anymore, but if you have a particular reason not to upgrade,
please at least have a look there :

   http://www.haproxy.org/bugs/bugs-1.3.18.html

Willy



Re: Fwd: Very odd behavior with 'cookie' only working intermittently

2013-06-26 Thread Chris Patti
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