Is it possible with HAproxy to change backend to secondary (backup) if primary don’t answer in certain time? I need all request sent do backend1, but if reply from backend1 won’t come in 500 ms then this request should be instead directed to backend2. In that case “stale” connection to backend1 should be terminated (or at least late reply from backend1 should be discarded). After 500 ms only reply from backend2 should be send to client.
Can you provide any tips for such configuration? Thank you in advance!