News for hackers. Stuff that matters.
Re:Mastering HTTP Caching – from request to response and eve... by tyingq on Sunday February 26, 2017 @11:56AM (#13738185)
The bigger problem with varnish, to me, is that it doesn't support TLS. So you end up fronting it, with say nginx...which also has a reasonable cache, so why bother?

Edit: Should mention that varnish is a nice piece of software...not bashing. It's just that most people would prefer less pieces in their overall solution.

Re:Mastering HTTP Caching – from request to response and eve... by simonw on Sunday February 26, 2017 @12:40PM (#13738462)
The varnish docs have a couple of philosophical essays on why they don't support SSL:

https://www.varnish-cache.org/docs/trunk/phk/ssl.html

https://www.varnish-cache.org/docs/trunk/phk/ssl_again.html

I think they are well justified in enforcing the separation of SSL code from caching memory management.

Re:Mastering HTTP Caching – from request to response and eve... by tannhaeuser on Sunday February 26, 2017 @12:08PM (#13738267)
And no support for HTTP/2 until recently. They're suggesting Hitch for SSL termination now.

[1]: https://info.varnish-software.com/blog/varnish-cache-5-http2...

Edit: Apache also has caching/does it all in one package; they're even contemplating a module for certbot (in addition to or as replacement for the official certbot/letsencrypt Python package for Apache)

Re:Mastering HTTP Caching – from request to response and eve... by porker on Sunday February 26, 2017 @12:29PM (#13738413)
Is nginx as a reverse proxy as efficient at caching as varnish? Asking as I haven't found any benchmarks on the subject.

I'm using varnish via Fastly, and have come to greatly appreciate the fast cache-clear, so we can push all content out into the cache, not just static assets.

Re:Mastering HTTP Caching – from request to response and eve... by cknight on Sunday February 26, 2017 @12:45PM (#13738497)
I believe NGINX's caching is as efficient, if not moreso, but it is less flexible. The tools available to you in Varnish's VCL are substantial, plus you get ESI support - something NGINX lacks.
Re:Mastering HTTP Caching – from request to response and eve... by detaro on Sunday February 26, 2017 @12:48PM (#13738510)
Also selective cache purging is a paid feature with nginx.
Re:Mastering HTTP Caching – from request to response and eve... by tyingq on Sunday February 26, 2017 @12:56PM (#13738559)
If you're using the filesystem backed cache with nginx, selective cache purge, stats, etc, is a fairly trivial scripting task.
Re:Mastering HTTP Caching – from request to response and eve... by unsignedinteger on Sunday February 26, 2017 @02:12PM (#13739104)
Agreed, There is also an OS alternative which essentially mirrors the functionality of propriety nginx cache purge: https://github.com/FRiCKLE/ngx_cache_purge

Hence you can just build it with your standing nginx binary reducing the need for miscellaneous scripts.

Re:Mastering HTTP Caching – from request to response and eve... by detaro on Sunday February 26, 2017 @02:32PM (#13739249)
thanks for the info/link!
Re:Mastering HTTP Caching – from request to response and eve... by tyingq on Sunday February 26, 2017 @12:46PM (#13738500)
I doubt there's a notable performance difference, and it's a bit of apples and oranges unless you front varnish with something that does SSL for your benchmark. Not many use cases for plain http caching anymore.

Varnish does likely have an edge with flexibility and expressiveness around configuration, since it's a single purpose tool.