Hacker News new | ask | show | jobs
by brokentone 4267 days ago
Varnish and caching in general can be a complete mind-freak the first few times you experience it, however after working with it nearly daily for the last 3 years, I've come to love it. It has allowed me to scale a number of WordPress websites far beyond where they had business being (34mm UV/180mm PV per month on a handful of servers). Super excited to see them continuing to build in great features.
2 comments

I have never tried but failed miserably in trying to setup a Varnish front-end for a wordpress setup - especially with pretty urls. The hard part was getting varnish to work with the admin interface - especially image uploads - and comments.

Do you know of any good starting config file that can be used ?

A couple of resources for Varnish 3:

* https://github.com/mattiasgeniar/varnish-3.0-configuration-t... (fairly well maintained with CMS specific VCL examples)

* https://github.com/slashsBin/nuCache (library for different programming languages, not so CMS centric)

Both of these are listed in our utilities directory:

* https://www.varnish-cache.org/utilities

Other Varnish (VCL) extensions can be found in the VMOD directory:

* https://www.varnish-cache.org/vmods

If you have ideas on how to make both these resource more visible and accessible for our users, please let me know.

@ruben_varnish - this is great ! thanks.

I think it would be great if varnish had an official repo with different configuration templates for different stacks that could be used as "drop-in".

For example, my question about a fairly basic Rails config (https://news.ycombinator.com/item?id=8431927) had a couple of different answers disagreeing about stuff.

Also, things like SSL termination are something that the documentation skips over entirely - I understand completely that Varnish does not implement it, but Varnish necessitates the introduction of certain other players in the stack, which it should document.

For example, a canonical example of varnish setup as Nginx (SSL termination) -> Varnish -> Nginx (reverse proxy) -> App would be very useful.

It's not difficult. You have to exclude (pass or pipe) either POST and /wp-admin OR all requests with wordpress logged in cookies. That's the basics of it. Also the resources Ruben listed are super great.

hit me on twitter @kentonjacobsen

>34mm UV/180mm PV per month on a handful of servers

Can you give more details about the hardware setup?

All bare-metal, 2 basic varnish, 4 beefier web heads, 2 really, really beefy DB + NFS.

hit me on twitter @kentonjacobsen