This module provides integration between your Drupal site and the Varnish HTTP Accelerator, an advanced and very fast reverse-proxy system. Basically, Varnish handles serving static files and anonymous page-views for your site much faster and at higher volumes than Apache, in the neighborhood of 3000 requests per second.
This module provides admin-socket integration which allows Drupal to dynamically invalidate cache entries, and also lets you query the Varnish admin interface for status, etc.
At the moment, using Varnish to any effect at all requires Drupal 7 or PressFlow.
We currently support Varnish 2.0, 2.1 and 3.
Helpful information for those new to Varnish:
- Gregory Chaix's example VCL
- Setting up Varnish and Pressflow Project Mercury Style
- Varnish and Drupal on varnish-cache.org
Also, this module is beginning to implement dynamic cache expiration via the expire module, which will allow for much longer page lifetimes (and thus higher cache hitrates!).
Drupal 7 version
A development release for Drupal 7 has just been released. This version is very similar to the D6 version, the only major difference is that the D7 version uses a cache backend plugin that can be used for cache_page instead of the built in database cache. In order to get the Varnish module working for D7, you need to add something like this to your settings.php file:
// Add Varnish as the page cache handler.
$conf['cache_backends'] = array('sites/all/modules/varnish/varnish.cache.inc');
$conf['cache_class_cache_page'] = 'VarnishCache';
// Drupal 7 does not cache pages when we invoke hooks during bootstrap. This needs
// to be disabled.
$conf['page_cache_invoke_hooks'] = FALSE;
This release needs some love in form of testing and bug reports. Please report anything you find, so we can get a stable release out as fast as possible! =)
"Varnish" is a registered trademark used with permission from Varnish Software.