backend/director admin states

Poul-Henning Kamp phk at
Thu May 3 09:20:45 UTC 2018

OK, let me try to explain my mental model of this:

Admin health is owned by the CLI and director implementations do not
get to meddle with it.  (But they do get to see it)

  Admin=sick means sick, no matter what the director implementation thinks.

  Admin=healthy means healthy, --//--

  Admin=??? means "Implementation decides if sick or healthy."

Best proposal for "???" seems to be "auto", even though it is not
entirely on point.

The implementation can control its view of the health two ways

  A) Call VRT_SetHealth() and set it on the director.
     (useful for probes as we know them)

  B) Provide a ->healthy() method which will be asked whenever
     anybody wants to know.
     (useful for selecting directors like rr/fb/rnd/hash)

In the new API, there is a director method called ->list() which
gets called during CLI command 'backend.list' so that UX can reflect
what the implementation actually know as best as possible.

So as I see it:  We need to decide:

   1) Best word for "???" above.

   2) Headers in backend.list

   3) What does H1 backend without probe do for ->list()

   4) What does H1 backend with probe do for ->list()

   5) What do vmod_directors do for ->list()


PS: Related stuff:

I'm pondering a "VCL_BACKEND std.resolve_backend(VCL_BACKEND)" to
avoid what seems to me to be a lot of complexity in shard to do
the same?

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list