All of the examples I've seen of using upstream (for load balancing) in nginx look like this:
upstream backend {
server backend1.example.com:8080 max_fails=3 fail_timeout=30s;
server backend2.example.com:8080 max_fails=3 fail_timeout=30s;
server backend3.example.com:8080 max_fails=3 fail_timeout=30s;
}
It seems repetitive to re-set max_fails and fail_timeout for each backend, when typically they are always the same. Is it possible to set max_fails and fail_timeout for all of the backend servers at once?