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

Reply via email to