in Interesting, Performance

How much faster can HN be behind Varnish?

We took one virtual machine from our fleet and crafted it so it proxies HN via Varnish and Nginx with the intention to see how much we can speed things up for read-only visitors. The results are interesting although not so surprising (TL;DR at end of post). The caching logic from this experiment can be integrated with the our previously suggested auto throttling of Varnish.

The VM is constructed to:

a) Run Varnish in front of Nginx, which pulls objects from for caching

b) Create a shared cache object for each resource (non-cookied, anonymous, etc)

c) Replace instances with so http_sub_module was compiled in.

d) Inject Non binary objects with header X-Robots-Tag “noindex, nofollow” to prevent SEO penalties

This is the score of HN without Varnish proxying:



This is the score of HN with Varnish proxying:



  • Fast page load times (~32% faster)
  • Better *cached* load times (~50% faster)
  • Comments (/items) have a lower TTL than other pages so


UNIXy provide fully managed servers and clusters in four of our locations around the world and are very happy to go above and beyond to make a client’s day. We LOVE helping our clients!