If so, what are the parameters for the fail-over? Timeout or 50X/40X response?
Yes, this can be done with a message proxy.
You would create a message proxy and configure a Secondary Connection:
The fail over triggers when the proxy receives a Error status code 4XX or 5XX.
Clip of the Virtualize user guide in regards to this feature: