Hello,
I’m not yet an Nginx user, but have a question on it’s capacbility.
I’ve had a look at the http load balancer, but cannot see anything that
would allow me to set the % or number of servers in an upstream backend
group that should be available before an error response is returned.
The scenario I am looking into is one where Nginx can manage load
balancing
across servers in a tier and there are multiple tiers. If less than 50%
servers are available in any tier I would like to respond with a HTTP
failure and the hardware load balancer can then route traffic to a
standby
data centre.
If the status page returns information about all the servers in the
group in
each tier then perhaps some orchestrating check called by the hardware
load
balancer could detemine whether the site is considered available?
Is an orchestrating check available in Nginx and can % available be set?
As per the docs, I do not see a mean of doing what you wish directly in
an
upstream block.
That cut-off might be a feature request you could post on their bug
tracker.
In the meanwhile, you might parse data about servers from an upstream
group
on a status page you would have configured.
However, the status module is only part of the commercial version of
nginx,
not the FOSS one. Have a look: http://nginx.org/en/docs/http/ngx_http_status_module.html#status_zone
That is the best answer I could provide you with. Maybe someone else
could
help you further?
As per the docs, I do not see a mean of doing what you wish directly in an
upstream block.
That cut-off might be a feature request you could post on their bug tracker.
In the meanwhile, you might parse data about servers from an upstream group
on a status page you would have configured.
However, the status module is only part of the commercial version of nginx,
not the FOSS one. Have a look: Module ngx_http_status_module
[…]
There is also a demo page that in more user-friendly way demonstrates
most of
the data provided by the status module.