Retry a Failed HTTP Request
To retry an HTTP request when the server returns an HTTP error:
backendsection of your load balancer configuration, set the
retriesdirective to the number of times to retry a failed HTTP request.
Attempt to connect to the server 5 times before giving up and returning the HTTP error.
backend webservers mode http retries 5
retry-ondirective to define specific types of HTTP errors that should trigger a retry. Options include:
Retry when the request fails due to failure 503 or 504.
backend retry-on 503 504
Optional: Add to the
retry-ondirective specific types of TCP connection problems that should trigger a retry, in addition to HTTP conditions. Options include:
Retry the connection if the connection could not be established or was closed while sending the request.
backend retry-on conn-failure empty-response 500
Next upCircuit Breakers