Hacker News new | ask | show | jobs
by may 5362 days ago
Can someone explain to me why Nginx is faster than Varnish with static assets?

I am assuming that this is because Nginx is faster at basic HTTP serving than Varnish. However, I am further assuming that if you have dynamic content served from a cache will always be faster than from the webserver; even if your webserver is super-fast you still have to wait for the page to be generated by your CMS, webapp, etc.

I ask because I am working on some blog software (http://github.com/may/yabe) and one feature I'd like to incorporate is super-fast page loads -- implemented via cache.

As the site will be .. "half-dynamic" -- new posts are added every day or so -- I would like to re-generate the HTML on every request, but cache the results for a few hours. I was planning to rely on Varnish, Squid, etc. to keep the load off my webserver.

Thoughts?