Hi, I have Ecommerce type of web server with dynamic pages that establish 
session cookie.

If I use the following HAProxy configuration, then the client gets "HTTP/1.1 
400 Bad Request " and "Your browser sent a request that this server could not 
understand."
Listen proxy1 200.200.1.16:80
            Mode http
            cookie SERVERID insert indirect
            balance roundrobin
            stats enable
            log 127.0.0.1 local0
            timeout client 30s
            timeout server 30s
            timeout connect 5s
            option tcpka
            server webA 200.200.2.18:80 cookie A


However, if I use the following configuration, it works fine.
Listen proxy1 200.200.1.16:80
            Mode http
            balance roundrobin
            stats enable
            log 127.0.0.1 local0
            timeout client 30s
            timeout server 30s
            timeout connect 5s
            option tcpka
            server webA 200.200.2.18:80


However, when I have multiple servers, I do want to use cookie in configuration 
to look for a particular cookie which will contain
a server identifier which should handle the connection. Can any one suggest the 
correct cookie setting in configuration file?
Thanks,
Chih-fan Hsin

Reply via email to