In an Nginx configuration with an upstream definition it is possible to define the parameters max_fails
and fail_timeout
as arguments to the server
directive, such as:
upstream dynamic {
server backend2.example.com:8080 fail_timeout=3 max_fails=3;
}
But in our configuration we're proxying to backends by dynamically generating the backend names based on the request, so we don't have upstream definitions:
proxy_pass http://${org}-http.hosted-service.svc.cluster.local:3000;
Is there a way how we can set the fail_timeout
and max_fails
globally without having to define an upstream
for each possible value of ${org}
?
Our Nginx version is 1.13.7