Can HAProxy send some requests to all servers defined for a backend

haproxy

I'm using HAProxy 1.8 to proxy requests to my HTTP API and now want to load-balance between multiple servers, so something like this:

backend http-in-backend
    balance roundrobin
    server api-server1 10.1.1.1:1234
    server api-server1 10.1.1.2:1234

However, there are some requests that need to be sent to all servers. It's OK to return the response from any of them to the client in this case, as the response should be the same. Is there a way to do this? I can conditionally send those requests to a separate backend, of course. So the problem is really: how do I send one request to multiple servers and return the response from any one of them?

Best Answer