A director is considered healthy is any of its backend is healthy, so if you put a director in req.backend_hint, you're good.
-- Guillaume Quintard On Wed, Dec 7, 2016 at 9:29 AM, Thijs Cramer <[email protected]> wrote: > Given the following code: > > ========================================= > sub vcl_synth { > if (resp.status == 999) { > set resp.status = 200; > set resp.http.Content-Type = "text/html; charset=utf-8"; > synthetic( {"Static HTML"} ); > return(deliver); > } > } > > # Check if backend is healthy, otherwise, redirect > if (!std.healthy(req.backend_hint)) { > return (synth(999, "All backends down.")); > } > > ========================================= > > Will the static page be served if ALL backends are down, or just when > the specific backend it got back from the backend_hint is down? > > We want to be able to serve static html as a fallback if all backends > are down. > > Is this the proper way to do this? > > Thanks in advance! > > - Thijs > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
