

Varnish Cache v3.0 - Features and Additions in Brief - jjoe
http://blog.unixy.net/2011/06/varnish-cache-v3-0-what-to-expect/

======
sigil
_VMOD is to Varnish as loadable module is to a kernel. The new Varnish
provides a programmable interface that enables expanding the VCL (Varnish
Configuration Language)._

VCL is the only fault I can find with Varnish. Is a new language really
necessary here? Why not extend via lua or scheme?

~~~
kierank
It's a compiled language for speed and so that people can use inline C to
write simple extensions.

~~~
buro9
Inline C can offer more than just simple extensions.

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.

~~~
StavrosK
Ah, the infamous second single sign-on system! I was going to send you this
link, good thing you saw it. I'm very excited about the prospect of a Lua
Varnish module, I think it would make this sort of hackery (writing server
modules directly for various tasks) much easier.

------
spjwebster
I know the title says "in brief", but it's a little _too_ brief for me. From
the horse's mouth:

[http://www.varnish-software.com/blog/varnish-30-changes-
esi-...](http://www.varnish-software.com/blog/varnish-30-changes-esi-and-gzip)

[http://www.varnish-software.com/blog/bans-and-purges-
varnish...](http://www.varnish-software.com/blog/bans-and-purges-varnish-30)

<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...](http://kristianlyng.wordpress.com/2011/06/09/varnish-3-0-0-rsn/)

------
justincormack
About the same day as Apache Traffic Server, another http proxy, hit version
3.0 as well <http://trafficserver.apache.org/>

Has anyone used ATS, any recommendations over Varnish?

------
fungi
varnish

~~~
jjoe
Thanks

