Varnish and failed upstream

Dridi Boukelmoune dridi at
Wed Jul 10 16:53:19 UTC 2019

On Tue, Jul 9, 2019 at 8:12 AM Nikolay Bogdanov
<nikolay.bogdanov at> wrote:
> Hello. I have one case and I can not find good solution for it.
> In varnish3 req.backend was saved during restarts, so I can compare old backend property and set other backend after first restart.
> But in varnish 5 and newer req.backend_hint in vcl_recv is default always. I can not use retry in vcl_backend_response, because this function did not called.
> How can I fix it?

What you are looking for is probably a circuit breaker, you can
implement one with vmod-saintmod:

However instead of using it with req, it's probably more efficient to
work on the backend side and retry from vcl_backend_fetch or


More information about the varnish-misc mailing list