0

Please help me out,

We're using HAProxy (my-proxy.com) and on the backend side, we have two endpoints

- backend1:4000/foo/abc
- backend2:4000/bar/def

Now, when a client makes a request to my-proxy.com, we want to route that request to one of the servers in a round-robin fashion while keeping the query intact. For example:

my-proxy.com?query1=abcd&query2=123 ==> `backend1:4000/foo/abc?query1=abcd&query2=123
my-proxy.com?query1=abcd&query2=123 ==> `backend2:4000/bar/def?query1=abcd&query2=123

We have the following setting and it's not working:

frontend localhost
    bind *:80
    bind *:443 ssl crt /etc/ssl/tls.pem
    mode http
    default_backend my_backend

backend my_backend
    mode http
    timeout server 5s
    balance roundrobin
    server s01 backend1:4000/foo/abc check
    server s02 backend2:4000/bar/def check

Is there any way to achieve this setting? Please point me in the right direction, thanks!

  • Not enough information about why do you think "it's not working". Seems like you didn't even try to investigate anything about how is it working in your setup. A decent question would contain the part where you explain how this setup really works instead of what you're hoping about. – drookie Sep 09 '19 at 18:29
  • @drookie Sorry, I didn't bring it up. I've tried for days without any luck. I've read the docs but couldn't figure it out. There're are also many questions that seem related but do not answer my question. – Fingertron Sep 10 '19 at 03:36

0 Answers0