Start nginx with all servers weighted=0

Pablo Fischer pablo at
Wed Dec 19 19:47:04 UTC 2018

Hi all,

Sorry for posting to nginx-devel but looking to see if I'm missing any
details. I'm building a service discovery integration on top of our
Nginx, things work fine but there are two caveats:

- Nginx does not allow you to start with an empty upstream (aka no hosts).
- Nginx errors out with invalid configuration if you set a weight to "0".

I'm wondering if there is any technical reason of why I _should not_
make a patch that would allow the weight to be 0 during startup
configuration (or reload), looking specifically at this:

or... if there is a known patch that does this already then even better.

We have a module that allows us set the weights dynamically via a URL
we have without reloading nginx (we can't execute continuous reloads
since our buffers are maxed out so this could potentially throw the
host into a OOM case).


More information about the nginx-devel mailing list