4 ms·
I've always had a great a time using Fastly (varnish) for caching. You can cache a lot more than you think if you mastermind your strategy. A diagram of fastl
by thomasfromcdnjs 3y ago
I've always had a great a time using Fastly (varnish) for caching.
You can cache a lot more than you think if you mastermind your strategy.
A diagram of fastly/varnish state -> https://www.integralist.co.uk/images/fastly-request-flow.png https://www.integralist.co.uk/images/fastly-request-flow.png
- 8organicbits 3y agoI 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...