<div dir="ltr">I think I could live with "auto" meaning "dependent/probe" depending on the type of object.<div><br></div><div>Not sure the disabled case is super useful. If I get what you say, the only thing differing from setting it to sick is that we keep using the open connections, instead of finishing in-flight requests. Is it worth it?<br><div><br></div><div>I'd argue "deleted" should be "dead", just to complete the medically depressing vocabulary list you started :-)</div></div><div><br></div><div>(and we'll need to bring back "saint" from the dead)</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote">On Wed, May 2, 2018 at 4:50 PM, Nils Goroll <span dir="ltr"><<a href="mailto:slink@schokola.de" target="_blank">slink@schokola.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">this is a follow up to a discussion between phk and myself on #varnish-hacking<br>
today:<br>
<br>
phk is in the process of restructuring director/backend APIs. One of the areas<br>
currently reconsidered is the admin health status. As of now<br>
(<wbr>68a78f94b3a4e702edf73dea4e11e6<wbr>26c4c20301), the admin health has become private<br>
to varnishd (off limits to vmods) and semantics have changed.<br>
<br>
We discussed which admin health states should exist and their semantics. Notice<br>
that for the "probe" admin health, the actual health state is determined by the<br>
probe.<br>
<br>
Here's my proposal:<br>
<br>
* auto<br>
<br>
this state is the default and only exists as an argument to varnishadm<br>
backend.set_health. It resolves to either<br>
<br>
- "probe" if the backend/director has a probe<br>
- "dependent" if the director has no probe, but a healthy callback<br>
- "healthy" otherwise (no probe and no healthy callback)<br>
<br>
* healthy<br>
<br>
The backend/director is considered unconditionally healthy. Connections will<br>
be attempted.<br>
<br>
This state is used for backends without a probe and can be manually set<br>
using varnishadm backend.set_health and from vmods.<br>
<br>
* sick<br>
<br>
The backend/director is considered unconditionally sick. Connections will not<br>
be attempted.<br>
<br>
Can be manually set using varnishadm backend.set_health and from vmods.<br>
<br>
* disabled<br>
<br>
The health state is determined as for "probe" or "healthy" but a newly added<br>
VRT / vmod_std function (e.g. backend_disabled()) returns true. Directors may<br>
offer the choice to use disabled backends or not.<br>
<br>
Can be manually set using varnishadm backend.set_health and from vmods.<br>
<br>
The use case is to flag a backend for plannend maintenance such that it is<br>
used for existing sessions, but not for new ones.<br>
<br>
* probe<br>
<br>
The health state is determined by a probe, yet connections can still be<br>
attempted even if the probe is unsuccessful and directors may offer the choice<br>
to still hand out unhealthy backends.<br>
<br>
This state can not be set explicitly, but is selected through<br>
varnishadm backend.set_health auto or from vmods.<br>
<br>
* dependent<br>
<br>
The health state of the director is determined by the backends it refers to.<br>
<br>
This state can not be set explicitly, but is selected through<br>
varnishadm backend.set_health auto or from vmods.<br>
<br>
* deleted<br>
<br>
The backend has been deleted (via a vmod) will be removed once all references<br>
have been cleared.<br>
<br>
<br>
<br>
Illustrated example: varnishadm backend.list output<br>
<br>
Backend name Admin Probe Last change<br>
boot.b1 probe 0/8 bad Wed, 02 May 2018 13:22:10 GMT<br>
boot.b2 probe 8/8 good Wed, 02 May 2018 13:22:10 GMT<br>
boot.b3 healthy 1/8 bad Wed, 02 May 2018 13:22:10 GMT<br>
boot.b4 healthy - Wed, 02 May 2018 13:22:10 GMT<br>
boot.b5 sick 7/8 good Wed, 02 May 2018 13:22:10 GMT<br>
boot.b6 sick - Wed, 02 May 2018 13:22:10 GMT<br>
boot.b7 disabled 7/8 good Wed, 02 May 2018 13:22:10 GMT<br>
boot.b8 deleted - Wed, 02 May 2018 13:22:10 GMT<br>
boot.d1 dependent - Wed, 02 May 2018 13:22:10 GMT<br>
boot.d2 probe 3/4 good Wed, 02 May 2018 13:22:10 GMT<br>
<br>
in detail:<br>
<br>
* boot.b1 probe 0/8 bad<br>
<br>
backend with a probe for which all recent health checks have failed<br>
<br>
result from set_health=auto or default<br>
<br>
* boot.b2 probe 8/8 good<br>
<br>
backend with a probe for which all recent health checks have succeeded<br>
<br>
result from set_health=auto or default<br>
<br>
* boot.b3 healthy 1/8 bad<br>
<br>
backend with a probe for which most recent health checks have failed<br>
<br>
result from set_health=healthy<br>
<br>
* boot.b4 healthy -<br>
<br>
backend with no probe<br>
<br>
result from set_health=healthy, set_health=auto or default<br>
<br>
* boot.b5 sick 7/8 good<br>
<br>
backend with a probe for which most recent health checks have succeeded<br>
<br>
result from set_health=sick<br>
<br>
* boot.b6 sick -<br>
<br>
backend with no probe<br>
<br>
result from set_health=sick<br>
<br>
* boot.b7 disabled 7/8 good<br>
<br>
backend with a probe for which most recent health checks have succeeded<br>
<br>
result from set_health=disabled<br>
<br>
custom vcl logic will not use this backend for new sessions<br>
<br>
* boot.b8 deleted -<br>
<br>
backend has been removed (by a vmod)<br>
<br>
* boot.d1 dependent -<br>
<br>
director without a probe<br>
<br>
result from set_health=auto or default<br>
<br>
* boot.d2 probe 3/4 good<br>
<br>
director with a probe, which returns 3/4 success (may be the number of healthy<br>
backends)<br>
<br>
result from set_health=auto or default<br>
______________________________<wbr>_________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-dev</a><br>
</blockquote></div><br></div>