Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Healthcheck doesn't seem to do anything #14

Open
fastdude7 opened this issue Mar 19, 2012 · 0 comments
Open

Healthcheck doesn't seem to do anything #14

fastdude7 opened this issue Mar 19, 2012 · 0 comments

Comments

@fastdude7
Copy link

With the hash module included and the following in the config

    upstream myproject {
            server 10.9.8.181:80; # weight=1 max_fails=1;
            server 10.9.8.193:80; # weight=1 max_fails=1;
            hash $filename;
            hash_again 2;
            healthcheck_enabled;
            healthcheck_delay 5000;
            healthcheck_timeout 20000;
            healthcheck_failcount 1;
            #healthcheck_expected 'I_AM_ALIVE';
            healthcheck_send "GET /health HTTP/1.0" 'Host: $http_host';
    }

    server {
            listen 80;
            server_name "";
            access_log log/localhost.access.log main;

            location / {
                  set $filename $request_uri;
                  if ($request_uri ~* ".*/(.*)") {
                    set $filename $1;
                  }
                  proxy_set_header Host $http_host;
                  proxy_pass http://myproject;
                  proxy_connect_timeout 3;
            }

            location /stat {
                    healthcheck_status;
            }
    }

If a the health check file is removed from one of the servers requests are still sent to that server. the stat page confirms the server is "down"

Perhaps this is not a issue with the health checking but a issue with http://github.com/cep21/nginx_upstream_hash/tree/support_http_healthchecks
either way why is this module so difficult to use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant