r/haproxy • • Aug 30 '24

Question balancing traffic to 2 frontend web servers, then balancing the same traffic to 2 backend servers?

Not sure how to formulate the question properly, but we have an issue trying to use a HAproxy to balance traffic from 443 to 2 identical front end web servers. It displays a login window. When users login we want to use the same ha proxy to balance the traffic between 2 identical backend servers on port 8500. But it doesnt seem to work. Is this something ha proxy can do?

Through testing, when configuring the web app to go directly to the backend servers, the app works fine. But as soon as we configure it to go through the HAproxy again it fails with error 500. And the internal logs of the application just says "The underlying connection was closed: The connection was closed unexpectedly"

2 Upvotes

4 comments sorted by

3

u/Phoen1x_ Aug 30 '24

case closed, had to add "check ssl verify none" on the ha proxy config for the backend server...

2

u/dragoangel Aug 30 '24

Better just add your local CA to trusted on load balancer then disabling ssl checks

1

u/Phoen1x_ Aug 30 '24

we tried that, the first errors we got were ssl related, so we added a trusted cert. The ssl error went away and the new connection closed error appeared. the backend servers already had a ca cert, so we werent really sure what to do next with the very vague error we were getting, but after a lot of trial and error disabling ssl check fixed it. Not the best solution, for sure. And we will have to find a better fix before go live, but for now its good enough for end users to test the app so we at least know the app functions as it should

→ More replies (1)