I am studying up on caching and I am looking into varnish for caching. I am wondering though how does varnish deal with dynamically generated content?
All over the place people are saying you shouldn't really cache content that might change a lot but on the other hand when I look at the response headers for stackoverflow I see pages being served up via varnish.
Content here changes by the second so how does this even work? Excuse me if it's a bit of a simple question, I will research some more while this question is up.
Varnish Enterprise is a powerful, feature-rich web cache and HTTP accelerator, solving all kinds of challenges related to video streaming, CDN and website acceleration. Our software offers unmatched performance, robustness and flexibility for staying competitive at scale.
Suggest Edits. With the Dynamic Page Caching (DPC) behavior enabled, the Akamai edge servers can cache and serve the same dynamically generated pages to different users.
To verify that Varnish is proxying look for the existence of the X-Varnish header in the response. The Age header will be 0 on a cache miss and above zero on a hit. The first request to a page will always be a miss.
You need to define dynamic :
As for the stackoverflow architecture, you may learn a lot reading Nick Craver's blog post about it : http://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With