Hi Uday,

Check your logs, it will probably tell you that the body was already
consumed and for this reason it can't retry. If that's the case, check out
https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-cache-req-body

If not, please send us the complete logs (varnish -g request ...) and we'll
look at it in greater details.

Cheers,

-- 
Guillaume Quintard


On Thu, Oct 10, 2024 at 7:31 PM Uday Kumar <[email protected]> wrote:

> Hello All,
>
> We have configured varnish in such a way that if one of the backend
> returns *404 code*, varnish retries the request on another healthy
> backend.
> Varnish version: varnish-6.0.11
>
> *Sample Configuration (default.vcl):*
> sub *vcl_backend_response *{
> if (beresp.status == 404 {
>             return(retry);
>         }
> }
>
> But in some cases, varnish retry is not happening as expected.
>
> Upon analysis we have found the only difference in requests is *payload*
>
>
>
> *Examples:Request Pattern-1:*
> /GET
> Request URL
> HTTP Protocol
> Request Headers
>
> *Request-Pattern-2:*
> /GET
> Request URL
> HTTP Protocol
> Request Headers
> *payload*
>
> Please help us understand if there are any scenarios where varnish retries
> won't happen.
>
> *Thanks & Regards,*
> *Uday Kumar*
> _______________________________________________
> 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

Reply via email to