Drupal 8 and Varnish Reverse Proxy

Submitted by dryer on Sun, 08/16/2015 - 18:27
Varnish bunny

Drupal 8 will be slower at release time than Drupal 7 is. For a first release this is understandable and is by no means a deal breaker, since Drupal 8 offers muhch improved facilities for caching on the HTTP level natively, thanks to the use of HttpKernel component from Symfony.

Drupal 8 ships with Page Caching enabled. by default. By definition this is exactly how the default Symfony Framework caching works. The framework ships with a reverse proxy built with PHP by default. This proxy handles in exactly the same way as a real reverse cache (Varnish now being the industry standard).

As for Drupal 8, while it does ship with Symfony Components, the setup is not completely like a Full Stack Symfony 2 Content Management System like eZ Platform. So you'll need additional modules, instead of built in functionality such as Context Aware HTTP Cache in eZ Platform.

But as this is Drupal there are plenty of modules for cache handling under works. One great example is the Purge Module under development for Drupal 8, which allows clearing Varnish, Squid or Nginx by issuing an http PURGE request to them. To look into how to create Cache Tags to work with Cache Tags, look at this presentation: Render Caching in Drupal 8

At this point, before launch some things are bound to change, but with Drupal 8 embracing the wider PHP community as a Request-Response framework, we can all enjoy similar syntax and concepts from Drupal 8 to Bolt CMS to eZ Platform.

For learning Caching internals in general in Drupal 8, I suggest Exploring the Cache API in Drupal 8