On Wed, Aug 19, 2015 at 10:53:07PM +0200, Thomas Lecomte wrote: > On Wed, Aug 19, 2015 at 5:36 PM, Thierry Leveque > <[email protected]> wrote: > > [...] > > Is something like that possible with Varnish? Is my explanation clear > > enough? > It is very clear, and indeed, that is how Varnish works. On the very > first request, an object will be created in the cache, and will be > marked as 'busy' until it is fully retrieved from the backend. > All the incoming requests for the same object will be queued, and as > soon as it will be fetched for the first request, it will be served to > all the waiting clients, which means the backend will see the request > only one time.
It can also be added that when the object TTL expires, Varnish will do a conditional request asking the backend if the cached version is still current. While this backend refresh is ongoing, any clients requesting the object in the meantime will receive the (slightly) stale/expired copy. This means that there is no waiting/delay before serving clients in normal operation. This applies for Varnish 4.0 and is of course configurable. -- Lasse Karstensen Varnish Software AS _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
