Hi everyone, I've been reading the docs all day, and I can't find
exaclty how to do this.
Below is a part of our haproxy config. We fork traffic coming into our
LB based on the URL of the request or a cookie that is set by the app.
Requests for a certain subset of our users, or a special URL, go to a
seperate set of servers (the 'stg-10x' boxes). Everyone else goes to
the normal-app.
We've had a request to do this sort of branching based on an HTTP
request parameter, either as a GET (on the command line), or via POST
(in the header). I had hoped I could use url_param with check_post, but
I can't seem to see how to do it.
The goal is, stated via logic "if there is a GET or POST variable called
'state' that has a value 'FL', then set the 'learn-request' acl."
Is this possible?
Here's what we have now:
acl learn-request hdr_beg(host) -i learn
acl learn-request hdr_reg(Cookie) userState=FL
use_backend learn if learn-request
default_backend normal-app
backend normal-app
mode http
option httpchk GET /healthCheck.jsf?checkMaster=true
server stg-1 stg-1.aws.REDACTED.com:80 cookie stg-1 check inter
10000 rise 2 fall 5
server stg-2 stg-2.aws.REDACTED.com:80 cookie stg-2 check inter
10000 rise 2 fall 5
server stg-3 stg-3.aws.REDACTED.com:80 cookie stg-3 check inter
10000 rise 2 fall 5
server stg-4 stg-4.aws.REDACTED.com:80 cookie stg-4 check inter
10000 rise 2 fall 5
server last-resort 10.10.1.57:7080 backup
backend learn
mode http
option httpchk GET /healthCheck.jsf?checkMaster=true
server stg-101 10.10.1.25:80 cookie stg-101 check inter 10000 rise 2
fall 5
server stg-102 10.10.3.207:80 cookie stg-102 check inter 10000 rise
2 fall 5
server last-resort 10.10.1.57:7080 backup