3 ms·
I was spec-ing out Varnish for a project recently and was really impressed with what it could do. The stale-while-revalidate approach (immediately serve data pa
by 8organicbits 3y ago
I was spec-ing out Varnish for a project recently and was really impressed with what it could do. The stale-while-revalidate approach (immediately serve data past the `ttl` for a `grace` period while asynchronously refreshing it) keeps data flowing. It can `keep` data past the `grace` period and serve that when the origin goes down or use that in conditional requests (If-Modified-Since) to the origin to prevent fetching unchanged content. Coalescing requests mitigates thundering herds that reach stale caches. VCL scripting makes the whole thing very configurable. I think Varnish needs better marketing, but I suppose Fastly does that now.
[1] https://www.varnish-software.com/developers/tutorials/http-caching-basics/ https://www.varnish-software.com/developers/tutorials/http-c...
[2] https://info.varnish-software.com/blog/request-coalescing-and-other-reasons-to-use-varnish-as-an-origin-shield https://info.varnish-software.com/blog/request-coalescing-an...
[3] https://docs.varnish-software.com/tutorials/object-lifetime/ https://docs.varnish-software.com/tutorials/object-lifetime/
[4] https://www.varnish-software.com/developers/tutorials/varnish-builtin-vcl/ https://www.varnish-software.com/developers/tutorials/varnis...