Haproxy with backend redirect

haproxy

I have an haproxy frontend that is basically redirecting to multiple backends. The logic to decide which backend to go to is outside of haproxy's control at the moment. However, what I would like to do (if haproxy will support it) is something like this:

frontend main localhost:4443
  default_backend be

backend be
  server be1 10.10.10.10:443 

And let my listening server at 10.10.10.10 issue a 302 redirect to forward the request on to the correct server.

However, I don't want the person accessing the front end to see this. I want the backend issuing the 302 back to haproxy, and haproxy hitting the new URL and forwarding that back to the frontend. Caching this would also be nice.

Is this feasible with haproxy? I can't tell from the configuration if this would work or not.

Best Answer

no it is not possible with haproxy, as haproxy does not cache requests nor responses and only forwards them once (you should compare it to any switch, router or firewall you may have). Some cache-enabled components might be able to do this, and I'm told that perlbal is able to do this too.

Related Topic