Welcome! Log In Create A New Profile

Advanced

Start nginx with all servers weighted=0

December 19, 2018 02:48PM
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:

https://github.com/nginx/nginx/blob/cb4dd56771c1af082bf3e810436712b4f48f2cf2/src/http/ngx_http_upstream.c#L5839

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).

Thanks!
--
Pablo
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Start nginx with all servers weighted=0

pfischer 328 December 19, 2018 02:48PM

Re: Start nginx with all servers weighted=0

Vladimir Homutov 154 December 19, 2018 03:20PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready