<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    The problem is that asking the backend to purge is not an option
    because that would not scale. If we would want to do that we need to
    know at the backend how many varnish nodes the cluster has and how
    to reach them all to purge the object effectively. Scaling the
    landscape would very soon become a big nightmare.<br>
    <br>
    The solution you provide here sounds like something that is
    programmable by someone familiar with VCL. VCL is completely new to
    me so I will start creating a flow diagram to see if I can
    understand that way what you wrote down. If you have any example
    code that would help me in the right direction I would be very
    happy.<br>
    <br>
    Best regards,<br>
    Jan Hugo Prins<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 01/24/2017 11:35 AM, Guillaume
      Quintard wrote:<br>
    </div>
    <blockquote
cite="mid:CAJ6ZYQy=uOs4+=D4kfCOTkS629r5+FoB6kNapAzhEwNSR4-nbQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Yes, you can:
        <div>- look for a match, and if you find one, note the etag,
          then restart. If no match is found, fetch and deliver</div>
        <div>- pass to the backend, if the etag doesn't match what you
          noted, ban the object. Note the new etag, restart again</div>
        <div>- if the new etag matches the one sent by the client,
          synthesize a 304, otherwise deliver</div>
        <div><br>
        </div>
        <div>But, is that really worth it? And is it easier than asking
          the backend to purge?</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="gmail_signature" data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>-- <br>
              </div>
              Guillaume Quintard<br>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">On Tue, Jan 24, 2017 at 11:19 AM, Jan
          Hugo Prins | BetterBe <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:jprins@betterbe.com"
              target="_blank">jprins@betterbe.com</a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Is it possible in any
              way to force the check before the result is send to the
              client?<span class="HOEnZb"><font color="#888888"><br>
                  <br>
                  Jan Hugo</font></span>
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <div class="m_106657607780149582moz-cite-prefix">On
                    01/24/2017 10:17 AM, Guillaume Quintard wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="auto">Hello,
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">Indeed, with this vcl code, the
                        object is checked asynchronously. So, if the
                        check fails, the user that triggered the check
                        will have received the outdated object. It may
                        or may not be an issue depending on your use
                        case.</div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">Note that you can reduce the TTL
                        further.</div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Jan 24, 2017 03:11,
                        "Jan Hugo Prins | BetterBe" <<a
                          moz-do-not-send="true"
                          href="mailto:jprins@betterbe.com"
                          target="_blank">jprins@betterbe.com</a>>
                        wrote:<br type="attribution">
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> After
                            reading this mail and doing a lot more
                            searching in the mailinglist and on the web,
                            I think it is actually rather simple. At
                            least I think that I'm seeing the correct
                            behaviour. I'm not sure though, it could be
                            that the response is first generated and
                            that the origin is only checked after the
                            response has been send to the client. What I
                            have now in my vcl_backend_response is
                            nothing more then:<br>
                            <br>
                            sub vcl_backend_response {<br>
                                if (beresp.http.Cache-Control ~
                            "must-revalidate") {<br>
                                    set beresp.ttl = 1s;<br>
                                    set beresp.keep = 3600s;<br>
                                    set beresp.grace = 3600s;<br>
                                }<br>
                                return (deliver);<br>
                            }<br>
                            <br>
                            <br>
                            Jan Hugo Prins<br>
                            <br>
                            <br>
                            <br>
                            <div
                              class="m_106657607780149582m_2639926546421627218moz-cite-prefix">On
                              01/23/2017 02:20 PM, Geoff Simmons wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <pre>On 01/23/2017 01:56 PM, Jan Hugo Prins | BetterBe wrote:
</pre>
                              <blockquote type="cite">
                                <pre>Somewhere I found an old Trac Wiki document that describes
something like this, but I can't figure out if this has been
implemented or not. 
<a moz-do-not-send="true" class="m_106657607780149582m_2639926546421627218moz-txt-link-freetext" href="https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests?version=8" target="_blank">https://www.varnish-cache.org/<wbr>trac/wiki/BackendConditionalRe<wbr>quests?version=8</a>
</pre>
      </blockquote>
      <pre>That
</pre>
      <blockquote type="cite">
        
      </blockquote>
      <pre>Wiki page is obsolete -- it was about an experimental branch that
was developed while Varnish 3 was the released version.

(Maybe we should delete the Wiki page, it's not the first time someone
has been led astray.)

Varnish has supported 304 responses to client requests with
If-Modified-Since/If-None-Matc<wbr>h for as long as I've known about it
(going back to Varnish 2). Backend conditional requests have been
supported since Varnish 4.

However, by default that doesn't quite work as your flow chart
indicates, if I've understood it correctly. If the client request is
for a cached response with an unelapsed TTL, then Varnish delivers the
cached response unconditionally, without re-validating the response
with the backend. Conditional requests to backends are done for the
fetch after the TTL elapses.

That's the default, but I believe you can get your own VCL to
implement re-validation after cache hits. I haven't tried that myself
-- maybe someone reading the list has some working VCL they can share?


Best,
Geoff
</pre>
    </blockquote>
    

    <div class="m_106657607780149582m_2639926546421627218moz-signature">-- 

      <p style="font-family:Arial,Roboto;font-size:13px;color:#000000;line-height:20px;margin:0px;margin-top:20px;margin-bottom:50px"> Met
        vriendelijke groet / Best regards,

        

        Jan Hugo Prins

        <i>Infra and Storage consultant</i>
      </p>
      <table style="min-width:460px" border="0" cellpadding="0" cellspacing="0" width="460">
        <tbody>
          <tr>
            <td colspan="3" style="padding-bottom:40px"><a moz-do-not-send="true" href="https://www.betterbe.com" target="_blank"><img src="cid:part4.C642C2E2.BC95F758@betterbe.com" alt="BetterBe - Transforming automotive leasing
                  worldwide"></a></td>
          </tr>
          <tr>
            <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px">Auke Vleerstraat 140 E</td>
            <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><b>T</b> <a moz-do-not-send="true" href="tel:+31%20%280%29%2053%2048%2000%20694" style="text-decoration:none;color:#332f60" target="_blank">+31 (0) 53
                  48 00 694</a></td>
          </tr>
          <tr>
            <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px">7547 AN Enschede</td>
            <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><b>E</b> <a moz-do-not-send="true" href="mailto:jprins@betterbe.com" style="text-decoration:none;color:#332f60" target="_blank">jprins@betterbe.com</a></td>
          </tr>
          <tr>
            <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px">CC no. <a moz-do-not-send="true" href="https://www.kvk.nl/orderstraat/product-kiezen/?kvknummer=080975270000" style="text-decoration:none;color:#332f60" target="_blank">08097527</a></td>
            <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><b>M</b> <a moz-do-not-send="true" href="tel:+31%20%280%296%2026%20358%20951" style="text-decoration:none;color:#332f60" target="_blank">+31 (0)6
                  26 358 951</a></td>
            <td style="font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><a moz-do-not-send="true" href="https://www.betterbe.com" style="color:#e73c57;font-weight:bold;text-decoration:none" target="_blank">www.betterbe.com</a></td>
          </tr>
          <tr>
            <td colspan="3" style="font-family:Arial,Roboto;font-size:9px;color:#a0a6b2;letter-spacing:0;line-height:1.5em;padding-top:40px"> BetterBe accepts no liability
              for the content of this email, or for the consequences of
              any actions taken on the basis of the information
              provided, unless that information is subsequently
              confirmed in writing. If you are not the intended
              recipient you are notified that disclosing, copying,
              distributing or taking any action in reliance on the
              contents of this information is strictly prohibited. </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>


______________________________<wbr>_________________

varnish-misc mailing list

<a moz-do-not-send="true" href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a>

<a moz-do-not-send="true" href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/varnish<wbr>-misc</a>
</blockquote></div></div>



</blockquote>
<div class="m_106657607780149582moz-signature">-- 
<p style="font-family:Arial,Roboto;font-size:13px;color:#000000;line-height:20px;margin:0px;margin-top:20px;margin-bottom:50px">
    Met vriendelijke groet / Best regards,

    

    Jan Hugo Prins

    <i>Infra and Storage consultant</i>
</p>

<table style="min-width:460px" border="0" cellpadding="0" cellspacing="0" width="460">
    <tbody><tr>
        <td colspan="3" style="padding-bottom:40px"><a moz-do-not-send="true" href="https://www.betterbe.com" target="_blank"><img src="cid:part13.C8B9DFD7.48A5C966@betterbe.com" alt="BetterBe - Transforming automotive leasing worldwide"></a></td>
    </tr>
    <tr>
        <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px">Auke Vleerstraat 140 E</td>
        <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><b>T</b> <a moz-do-not-send="true" href="tel:+31%20%280%29%2053%2048%2000%20694" style="text-decoration:none;color:#332f60" target="_blank">+31 (0) 53 48 00 694</a></td>
    </tr>
    <tr>
        <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px">7547 AN Enschede</td>
        <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><b>E</b> <a moz-do-not-send="true" href="mailto:jprins@betterbe.com" style="text-decoration:none;color:#332f60" target="_blank">jprins@betterbe.com</a></td>
    </tr>
    <tr>
        <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px">CC no. <a moz-do-not-send="true" href="https://www.kvk.nl/orderstraat/product-kiezen/?kvknummer=080975270000" style="text-decoration:none;color:#332f60" target="_blank">08097527</a></td>
        <td style="padding-right:40px;font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><b>M</b> <a moz-do-not-send="true" href="tel:+31%20%280%296%2026%20358%20951" style="text-decoration:none;color:#332f60" target="_blank">+31 (0)6 26 358 951</a></td>
        <td style="font-family:Arial,Roboto;font-size:12px;color:#332f60;letter-spacing:0.1px;line-height:1em;padding-bottom:5px"><a moz-do-not-send="true" href="https://www.betterbe.com" style="color:#e73c57;font-weight:bold;text-decoration:none" target="_blank">www.betterbe.com</a></td>
    </tr>
    <tr>
        <td colspan="3" style="font-family:Arial,Roboto;font-size:9px;color:#a0a6b2;letter-spacing:0;line-height:1.5em;padding-top:40px">
            BetterBe accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
        </td>
    </tr>
</tbody></table>
</div></div></div></div></blockquote></div>
</div>



</blockquote>
<div class="moz-signature">-- 
<p style="font-family: Arial,Roboto;font-size: 13px;color: #000000;line-height: 20px;margin:0px;margin-top:20px;margin-bottom:50px;">
    Met vriendelijke groet / Best regards,

    

    Jan Hugo Prins

    <i>Infra and Storage consultant</i>
</p>

<table style="min-width:460px;" border="0" cellpadding="0" cellspacing="0" width="460">
    <tbody><tr>
        <td colspan="3" style="padding-bottom:40px;"><a href="https://www.betterbe.com"><img src="cid:part20.42DD5941.2AE768FB@betterbe.com" alt="BetterBe - Transforming automotive leasing worldwide"></a></td>
    </tr>
    <tr>
        <td style="padding-right:40px;font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><nobr>Auke Vleerstraat 140 E</nobr></td>
        <td style="padding-right:40px;font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><nobr><b>T</b> <a href="tel:+31%20%280%29%2053%2048%2000%20694" style="text-decoration:none;color:#332F60;">+31 (0) 53 48 00 694</a></nobr></td>
    </tr>
    <tr>
        <td style="padding-right:40px;font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><nobr>7547 AN Enschede</nobr></td>
        <td style="padding-right:40px;font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><nobr><b>E</b> <a href="mailto:jprins@betterbe.com" style="text-decoration:none;color:#332F60;">jprins@betterbe.com</a></nobr></td>
    </tr>
    <tr>
        <td style="padding-right:40px;font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><nobr>CC no. <a href="https://www.kvk.nl/orderstraat/product-kiezen/?kvknummer=080975270000" style="text-decoration:none;color:#332F60;">08097527</a></nobr></td>
        <td style="padding-right:40px;font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><nobr><b>M</b> <a href="tel:+31%20%280%296%2026%20358%20951" style="text-decoration:none;color:#332F60;">+31 (0)6 26 358 951</a></nobr></td>
        <td style="font-family: Arial,Roboto;font-size: 12px;color: #332F60;letter-spacing: 0.1px;line-height: 1em;padding-bottom:5px;"><a href="https://www.betterbe.com" style="color: #E73C57;font-weight:bold;text-decoration:none;">www.betterbe.com</a></td>
    </tr>
    <tr>
        <td colspan="3" style="font-family: Arial,Roboto;font-size: 9px;color: #A0A6B2;letter-spacing: 0;line-height: 1.5em;padding-top:40px;">
            BetterBe accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
        </td>
    </tr>
</tbody></table>
</div></body></html>