i’m trying to use the HttpHealthcheckModule for nginx, but i have some
troubles with it.
i have two servers in my upstream, when sabotaging the health for one
server i see in the status view of healthcheck that the server is
down(1), but if i go to the website i’m checking i still come out on
it and see a broken page.
how can i arrange that the server automatically is marked as down when
the check fails?
sorry for my bad english and maybe noob questions.
Thank you for teh fix, it’s working now for standard round robin, for
upstream_hash it’s not working but that’s no problem for us we are not
using that in production.
The fail test also add one time to hash_again. Can you set hash_again
10(greater than or equal servers’s number), try again and tell me the
result? The upstream_hash module has worked for some time.
what we often use is gnosek-nginx-upstream-fair, to make it work with
that, can you tell how to handle?
Patch the upstream-fair module like round_robin and upstream_hash
module.
Maybe these should be a module that contains all of the following
features:
RR, Hash, Fair, Health check. Hope some body will provide such module.
I
don’t like patching code.
Thank you for teh fix, it’s working now for standard round robin, for
upstream_hash it’s not working but that’s no problem for us we are not
using that in production.
what we often use is gnosek-nginx-upstream-fair, to make it work with
that, can you tell how to handle?
this is what i’ve done to make it work for now:
peckhardt@test-nginx:~/nginx-1.0.6$ patch -p1 <
…/liseen-healthcheck_nginx_upstreams-17298cf/healthcheck.patch
patching file src/http/ngx_http_upstream.c
Hunk #1 succeeded at 4270 (offset 11 lines).
patching file src/http/ngx_http_upstream.h
patching file src/http/ngx_http_upstream_round_robin.c
Hunk #2 succeeded at 25 with fuzz 2 (offset 9 lines).
Hunk #3 succeeded at 33 (offset 9 lines).
Hunk #4 succeeded at 68 (offset 9 lines).
Hunk #5 succeeded at 416 (offset 7 lines).
Hunk #6 succeeded at 448 (offset 7 lines).
Hunk #7 succeeded at 465 (offset 7 lines).
Hunk #8 succeeded at 506 (offset 7 lines).
Hunk #9 succeeded at 523 (offset 7 lines).
Hunk #10 succeeded at 617 (offset 7 lines).
patching file src/http/ngx_http_upstream_round_robin.h
I confirmed that this is an issue only when ip_hash is used - without it
healthcheck fail causes upstream to stop routing requests to failing
node. Could use a bit of help understanding:
is this by design (i.e ip_hash support never implemented) or a bug?
I am happy to create an enhancement/fix but, as a c-newbie, would
appreciate a bit of guidance on where specifically to look in nginx or
I was seeing the same issue: when upstream node is down, healthcheck
correctly flags it as down yet subsequent requests are still routed to
that node (even though others are healthy).
Tried this patch with 1.0.13 and .15 - no relief:
Is the above supposed to work when ip_hash directive is used?