Varnish 3.0.0 has some great new features.
Varnish maintainers only provide Ubuntu repository for the LTS builds. Currently, Ubuntu 10.04 Lucid is the most recent LTS. However, I am running Ubuntu 11.04 Natty in my environment.
My options to try the new build are to build Varnish from source or use the Lucid Varnish package.
I decided to use the Lucid Varnish package and everything seems to be running well.
Following instructions from the Varnish Ubuntu installation guide:
curl http://repo.varnish-cache.org/debian/GPG-key.txt | \
apt-key add –
echo “deb http://repo.varnish-cache.org/ubuntu/ lucid varnish-3.0” >> \
apt-get install varnish
I was using highly customized VCL’s with the previous versions of Varnish. Attempting to start the Varnish server for the first time gave errors that were easy to resolve.
Notable changes (Varnish Changelog):
1) “purge” terminology is replaced with “ban”
purge req.url ~ ^/some/url$
ban req.url ~ ^/some/url$
2) Return logic has been slightly changed:
return(pass) in vcl_fetch has been renamed to
3) String concatenation now requires “+”
These were the biggest changes encountered for my needs. Fortunately, the VCL compiler is very thorough and gives detailed error messages with helpful suggestions when encountered.
The new Varnish setup is now being thoroughly tested and my customized VCL’s are working as expected.