diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index 222be82584..68b6ac378f 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -224,11 +224,13 @@ listen openqa 0.0.0.0:10044 listen pdc 0.0.0.0:10045 balance hdr(appserver) + # This makes haproxy set a cookie with the server the client used + # before. This is used to make sure the same client always goes to + # the same server (if it is up), because mod_auth_mellon wants a + # local state for now. + cookie SERVERID insert indirect nocache server pdc-web01 pdc-web01:80 check inter 10s rise 1 fall 2 -## pdc-web02 is commented out because we don't currently know how to configure -## mod_auth_mellon to work when distributed across more than one app node. It -## expects to be able to share some state between requests in-process. Boo. -# server pdc-web02 pdc-web02:80 check inter 10s rise 1 fall 2 + server pdc-web02 pdc-web02:80 check inter 10s rise 1 fall 2 option httpchk GET /rest_api/v1/ timeout server 3600000 timeout connect 3600000