Varnish Cache v3.0 - Features and Additions in Brief
blog.unixy.net
blog.unixy.net
VCL is the only fault I can find with Varnish. Is a new language really necessary here? Why not extend via lua or scheme?
If you want to see what the overhead is, the Lua module for Nginx is comparable if you compile with LuaJIT, should be fairly easy to benchmark just adding a small bit of code. Actually I tend to use this combination instead of Varnish where I actually want to mess with stuff, like do authentication while processing requests etc.
First thing I do with a production system is build it a new kernel, with a tight feature list, and disable modules.
I've extended Varnish 2.1.* to include a custom authentication layer that basically means I can drop multiple different applications behind Varnish and have the equivalent of a Web Account (of the ilk of Google Account, Yahoo Account, etc).
The functions provided by the shared library I've written require a whole load of VCL to grab hold of parts of the cookie and to pass things into the functions, before then handling the return values and re-writing headers (that the backend servers then look for).
It all works really well, and I haven't found VCL to be an ugly domain specific language to work with, especially when you consider that it translates directly to C which is then compiled.
When I think of what it took to write an Nginx mod, VCL with Inline C is a dream.
And why don't people ask the same thing about Apache or Nginx? The reason for that, IMHO, is that with VCL people see the potential of fine-grained request, response and cache control through a real programming language, but that's only because VCL is a DSL OK-ish enough for that purpose (something to think about).
http://www.varnish-software.com/blog/varnish-30-changes-esi-...
http://www.varnish-software.com/blog/bans-and-purges-varnish...
http://www.varnish-software.com/blog/streaming-varnish-30
Something to pay attention to from that streaming post: if the asset you're streaming isn't already in the varnish cache, only the first user to request it will get it streamed. All other clients will be blocked until the first stream is complete and cached.
> The object will be set to busy while it is streamed. Other clients will be put on hold. Furthermore, the rate at which the object is fetched by the client dictates how fast Varnish will fetch it from the backend.
Unless I'm reading the above wrong, [re-warming your cache for these large objects would seem more prudent than relying on streaming.
There's also a nice write-up by Redpill Linpro employee and Varnish contributor Kristian Lyngstøl:
http://kristianlyng.wordpress.com/2011/06/09/varnish-3-0-0-r...
Has anyone used ATS, any recommendations over Varnish?