<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">Is the ttl <= 0 when you return from vcl_backend_reponse? It looks like you are telling varnish to cache, for 0 seconds.</div><div dir="auto"><br></div><div dir="auto">The result is that it'll coalesce requests, but at the same time, can't reuse the responses, so the backend requests are just serialized.</div><div dir="auto"><br></div><div dir="auto">You have two ways to deal with that:</div><div dir="auto">- if you know in vcl_recv that the request isn't cacheable, return(pass).</div><div dir="auto">- if you discover the uncacheability in vcl_backend_response, set a positive ttl, and set beresp.uncacheable to true. This will tell varnish to remember to non coalesce requests for this object for the duration of the ttl.</div><div dir="auto"><br></div><div dir="auto">Note that this is already done in the built-in.vcl (<a href="https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/builtin.vcl">https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/builtin.vcl</a>) that gets appended to your code when you load a vcl. However this only gets executed if you don't return from the routine yourself.</div><div dir="auto"><br></div><div dir="auto">Hope that helps,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 17, 2019, 05:03 Rodrigo García Suárez <<a href="mailto:rodrigo.garcia@the-cocktail.com">rodrigo.garcia@the-cocktail.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 dir="ltr">Hello everybody.<div><br></div><div>I have this weird issue with Varnish 5.0.0 on Debian 9.4 and maybe somebody here can help me with it.</div><div><br></div><div>The thing is, I have this request:</div><div><br></div><div><a href="https://somehost.com//cart/current_cart.json?clear_cart=false&_=1550491039254" target="_blank" rel="noreferrer">https://somehost.com//cart/current_cart.json?clear_cart=false&_=1550491039254</a><br clear="all"><div><br></div><div>It is always a miss in varnish (as it should be) and making only one, works just fine.</div><div><br></div><div>But doing some performance testing the response times increases quickly. For example, with 2 requests/s, after 4 or 5 request, the response time begins to increase exponentially and after 20 request I have 11s of latency, reaching 40s after 40 requests.</div><div><br></div><div>If I take out Varnish (sending the request from nginx to the app) it works just fine. And looking at the varnish log, the "%T" format option in the backend log keeps a response <=1s but in the client side I see the incremental reponse times.</div><div><br></div><div>The request can't be cached so now I am keeping it out from varnish but I don't like the idea of this exception in the configuration and I am worry it could reproduce with other requests (in fact I have two other suspects) so any idea or suggestion will be greatly appreciated.</div><div><br></div><div>Thanks for your time.</div><div><br></div><div><br></div>-- <br><div dir="ltr" class="m_401548528672000213gmail_signature">Rodrigo García Suárez<br><a href="mailto:rodrigo.garcia@the-cocktail.com" target="_blank" rel="noreferrer">rodrigo.garcia@the-cocktail.com</a><br>679 141 132<br><br>The Cocktail<br>c/ Salamanca 17<br>28020 Madrid<br>(+34) 915 670 605<br><br>www > <a href="http://the-cocktail.com" target="_blank" rel="noreferrer">http://the-cocktail.com</a></div></div></div></div>
<br>
<p style="font-size:10px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><font size="2"><span style="font-family:Arial,sans-serif">Este mensaje se dirige exclusivamente a su destinatario. Puede contener información confidencial sometida a secreto profesional o cuya divulgación esté prohibida, en virtud de la legislación vigente. No está permitida su divulgación, copia o distribución a terceros sin la autorización previa y por escrito de The Cocktail. Si ha recibido este mensaje por error, le rogamos nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.</span><br></font></p><p style="font-size:10px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><span style="font-family:Arial,sans-serif"><font size="2">This message is intended exclusively for the individual or entity to which it is addressed and may contain confidential or legally privileged information, which may not be disclosed under current legislation. Any form of disclosure, copying or distribution of this message is strictly prohibited, save with written authorization from The Cocktail. If you have received this message in error, please notify the sender immediately by this way and delete all copies of the message.</font></span></p>_______________________________________________<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>