Greeetings and thanks for Haproxy
I have the following backends configured and working with correct ACLs:
backend back1
description balanced server apps
mode http
cookie SRV insert nocache indirect
balance roundrobin
option forwardfor
option redispatch
option http-server-close
option tcp-smart-connect
option httpchk HEAD /httpcheck.asp
server www01-sia 192.168.41.235:80 cookie 1 maxconn 200 slowstart
30s weight 1 check
server www02-sia 192.168.41.236:80 cookie 2 maxconn 200 slowstart
30s weight 1 check
backend back2
description single server apps
mode http
# reqadd Cookie:\ SRV=1
# reqidel ^Cookie:.*SRV=.*
# cookie SRV insert nocache
option forwardfor
server www01-sia 192.168.41.235:80 maxconn 500 slowstart 1m check
Now, i wish that when the client is on "back2", the SRV client cookie be
always rewritten with value 1 so, when client come back to "back1" will be
sticked to server 1
Is it possible? I think yes, but cannot figure out how
Thank you all again,
Runozo