Varnish Retry is not happening for some user requests (/GET)

Uday Kumar uday.polu at indiamart.com
Thu Oct 10 13:57:18 UTC 2024


Hi guillaume,

Thanks, will check this and get back to you

On Thu, Oct 10, 2024, 17:37 Guillaume Quintard <guillaume.quintard at gmail.com>
wrote:

> 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 <uday.polu at indiamart.com>
> 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
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20241010/321df117/attachment.html>


More information about the varnish-misc mailing list