Welcome! Log In Create A New Profile

Advanced

Introducing backend healthchecking plugin

February 26, 2010 08:30PM
I've written a plugin that can health check nginx backends, which everyone is free to use. This is similar to the healthchecking features that varnish and haproxy support. Here's a sample config[1] just to give you an idea, that uses the upstream_hash plugin. You can get the code here [2] and an example of how to patch upstream_hash here [3]. The plugin is actually an optional feature that other upstream plugins, like upstream fair or iphash for example, can plug into and use. To use it, their code needs to be modified to also check the health of the backend.

This plugin is super beta, so please be careful. Feedback/patches welcome.


[1]
  upstream test_upstreams {
    server localhost:11114;
    server localhost:11115;

    hash $filename;
    hash_again 10;
    healthcheck_enabled;
    healthcheck_delay 1000;
    healthcheck_timeout 1000;
    healthcheck_failcount 1;
    healthcheck_expected 'I_AM_ALIVE';
    healthcheck_send "GET /health HTTP/1.1" 'Host: www.mysite.com' 'Connection: close';
  }

[2]
http://github.com/cep21/healthcheck_nginx_upstreams
[3]
http://github.com/cep21/nginx_upstream_hash/tree/support_http_healthchecks


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Introducing backend healthchecking plugin

cep221 February 26, 2010 08:30PM

Re: Introducing backend healthchecking plugin

anomalizer March 01, 2010 05:54AM

Re: Introducing backend healthchecking plugin

cep221 March 02, 2010 02:57AM

Re: Introducing backend healthchecking plugin

Grzegorz Nosek March 02, 2010 03:08AM

Re: Introducing backend healthchecking plugin

cep221 March 02, 2010 03:34AM

Re: Introducing backend healthchecking plugin

Grzegorz Nosek March 02, 2010 04:14AM

Re: Introducing backend healthchecking plugin

Piotr Sikora March 02, 2010 05:26AM

Re: Introducing backend healthchecking plugin

Piotr Sikora March 02, 2010 05:24AM

Re: Introducing backend healthchecking plugin

anomalizer March 02, 2010 01:24PM

Re: Introducing backend healthchecking plugin

mike March 02, 2010 01:32PM

Re: Introducing backend healthchecking plugin

Piotr Sikora March 02, 2010 05:18PM

Re: Introducing backend healthchecking plugin

anomalizer March 02, 2010 09:52PM

Re: Introducing backend healthchecking plugin

Piotr Sikora March 02, 2010 11:16PM

Re: Introducing backend healthchecking plugin

Piotr Sikora March 08, 2010 04:20PM

Re: Introducing backend healthchecking plugin

cep221 March 09, 2010 12:42PM

Re: Introducing backend healthchecking plugin

Piotr Sikora March 09, 2010 01:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
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