I am cross posting this from stack overflow since it was suggested I might get a better answer here ...
I was wondering if anyone has used HAProxy for sharding. Specifically, I would like to be able use a cookie I define w/a identifier and have any client that presents that cookie/identifier combination be directed to the same server. It seems possible and my preliminary tests seem to work but I am not a sure.
My listen configuration looks like:
listen appli1-rewrite 0.0.0.0:80 cookie mysession= prefix balance roundrobin server app1_1 192.168.0.1:80 cookie server01 server app1_2 192.168.0.2:80 cookie server02 option httpclose
However, when I look at the request headers using Live Http Headers I don't see the mysession cookie indicating which server it will be going to, which is what I expected based on the prefix operation. I am quite new to HAProxy so any help/guidance would be great!