Hi,

I'm having another issue with HAProxy (v1.4.22). This time related to cookies 
that HAProxy sets for persistance.


When I run a load test with JMeter I have noticed that some, but not all, new 
threads receive a Set-Cookie header.


I'm thinking that this might be due to that I'm also using a sticky-table to 
maintain session stickiness on source IP address potentially rendering the 
cookie redundant, but I am not sure. (I have to stick on source IP since not 
all clients support cookies and session state needs to be maintained for each 
client). During the load tests with JMeter, I am relying on the set-cookie 
header to monitor and verify which thread gets routed to which server during 
the test.


The relevant parts of the config file is included below.


Thanks for any advice!


/ Mats


Config:


defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    #option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 128



listen express 127.........:...

    cookie GEAR insert indirect nocache
    option httpchk GET /
    http-check expect rstatus 2..|3..|401

    option httpclose

    # route all requests containing the word "foo" in the URL to the same server
    acl swi path_sub foo
    stick-table type ip size 200k expire 5m
    stick on src ipmask(0.0.0.0) if foo
    stick on src unless foo

    balance leastconn

    # more servers automatically added as load increases
    server local-gear 127.......:... check fall 2 rise 3 inter 2000 cookie 
local-abc.....


Reply via email to