Can an Apache proxy send one request to multiple servers

apache-2.2PROXY

We would like to send the request received by an Apache proxy to all of a set of downstream servers (in fact, also proxies, but I don't think this matters).

We know that all but at most one of these requests will fail, for a variety of reasons (server at that IP doesn't exist, is not listening on the right port, or the credentials are wrong).

We know that for one server, the request should work (but may not – the server may be powered off, not working correctly, overloaded etc). We don't know which of the servers this will be for any one request.

So we'd like to return the one correct response, if it happens, or if not any of the error responses (or a fixed failure response) should be returned.

Any ideas? It's not the most complex app to write if we need to do it from scratch, but we'd prefer to use Apache (which is already in place in our solution) if we can.

Best Answer

No, Apache's mod_proxy simply cannot send a request to multiple origin servers.