October 22, 2010
1 min read time

Notable new features in Varnish Cache 2.1.4

With the 2.1.4 release just out the door I think I should try to bring some attention to a couple of new features that are present.
The DNS Director
Sponsored by Globo and MercadoLibre the DNS director allows you to select a backend based on the content of a zone in DNS. If you, like the sponsors do, have a really large amount of virtual hosts backends, it becomes a real hassle to maintain and deploy the ever changing configuration.

Always miss
Varnish has had the option to PURGE content from it's initial release. The downside of this is that some poor user will have to come along and request the object and if the backends use some time to generate the object the poor user might have to wait awhile.
With always miss you can instruct Varnish to fetch a new version of a certain page, disregarding the content in the cache. When the page is fetched the old version will be discarded and your cache will be updated without having a user triggering the update.
Please remember that if your sites uses Vary you will have to do this for all the different variants of the page.
The Always miss feature was contributed by Artur Bergman aka "sky" on #varnish, the CTO of wikia.com.
The client director
The client director, which was introduced in 2.1.0, you could make Varnish hash the IP address of the client and choose a backend according to the result. For people having a load balancer in front of Varnish this didn't work so well. You can now set the input value directly in VCL giving you the option to use any header or string to choose your backend. Those of you with load balancers setting a session cookie might use the cookie to direct users to the right backend.