<div dir="auto">Hi guillaume,<div dir="auto"><br></div><div dir="auto">Thanks, will check this and get back to you</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 10, 2024, 17:37 Guillaume Quintard <<a href="mailto:guillaume.quintard@gmail.com">guillaume.quintard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Uday,</div><div><br></div><div>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 <a href="https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-cache-req-body" target="_blank" rel="noreferrer">https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-cache-req-body</a></div><div><br></div><div>If not, please send us the complete logs (varnish -g request ...) and we'll look at it in greater details.</div><div><br></div><div>Cheers,</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div><div>Guillaume Quintard<br></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 10, 2024 at 7:31 PM Uday Kumar <<a href="mailto:uday.polu@indiamart.com" target="_blank" rel="noreferrer">uday.polu@indiamart.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hello All,<br><br>We have configured varnish in such a way that if one of the backend returns <i>404 code</i>, varnish retries the request on another healthy backend.</div><div>Varnish version: varnish-6.0.11<br></div><div><br></div><div><i>Sample Configuration (default.vcl):</i><br>sub <i>vcl_backend_response </i>{<br>if (beresp.status == 404 {<br> return(retry);<br> }<br>}<br></div><div><br></div><div>But in some cases, varnish retry is not happening as expected.</div><div><br>Upon analysis we have found the only difference in requests is <b><i>payload</i></b><br><i><br><br>Examples:<br>Request Pattern-1:</i><br>/GET<br>Request URL<br>HTTP Protocol<br>Request Headers<br><i><br>Request-Pattern-2:</i><br>/GET<br>Request URL<br>HTTP Protocol<br>Request Headers<br><i>payload</i><br><br>Please help us understand if there are any scenarios where varnish retries won't happen.</div><div><br></div></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><font color="#666666"><i>Thanks & Regards,</i></font><div><font color="#666666"><i>Uday Kumar</i></font></div></div></div></div></div>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank" rel="noreferrer">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div>
</blockquote></div>