Introducing backend healthchecking plugin

Piotr Sikora piotr.sikora at frickle.com
Tue Mar 2 13:21:25 MSK 2010


> Do you mean use only ngx_supervisord?  From what I can tell, it requires a 
> separate daemon running on the machine that does the healthcheck, which 
> then sends a call to nginx via supervisord to turn servers off or on.  Is 
> that correct?

No, it's not :P

Neither ngx_supervisord nor supervisord do any healt-checking. 
ngx_supervisord communicates with supervisord (process manager) to 
dynamically start or stop backend servers, depending on the load. Since 
version 1.3 it also supports supervisord-less configuration which disables 
all communication with supervisord daemon (so it basically takes backend 
servers out of rotation without the need to reload nginx).

> Or did you mean call into ngx_supervisord when a healthcheck fails?  I'm 
> happy to integrate other APIs if you have some ideas.

Yeah, that's probably what Grzegorz meant. You would just need to call 
ngx_supervisord_execute(uscf, NGX_SUPERVISORD_CMD_STOP, backend_number, 
NULL) and then all ngx_supervisord-aware load balancers (upstream_fair, 
round_robin & ip_hash) would automagically stop using failed backend until 
you would execute NGX_SUPERVISORD_CMD_START.

Full API spec is available at:
http://github.com/FRiCKLE/ngx_supervisord/blob/master/patches/ngx_http_upstream_round_robin.patch

At the moment one would need to specify "supervisord none;" in order to 
enable supervisord-less configuration, because there is no such call in API, 
but I could add this in next release if you would like to use it.

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >
 




More information about the nginx mailing list