3 ms·
When you say static content, do you mean actual static content, or dynamic-but-still-kind-of-static? Actual static content like CSS files and background images
by notatoad 14y ago
When you say static content, do you mean actual static content, or dynamic-but-still-kind-of-static? Actual static content like CSS files and background images doesn't get any benefit from varnish. Something like the HN front page, where it is dynamic but consistent for all users at a specific point in time, is what you need to put behind varnish.
- kevinprince 14y agoIn high traffic caching css and images in varnish as well makes sense as it is much faster at evaluating and responding to the HTTP request than say Apache which will be busy building dynamic requests.
- justincormack 14y agoNot really the case if you are using Nginx though.
- autotravis 14y agoBoth. Varnish defaults to caching jpg,gif,png,css,etc. but we also having it caching things that are pulled from the db and processed. So it leaves our cpu-intensive backend untouched for the vast majority of requests.