Varnish

The Varnish container provides optional caching for content served by Drupal. It receives traffic from the HAProxy container and passses requests for uncached content down to Nginx.

Info

The Varnish container will simply honour whatever cache headers are supplied by your Drupal site, so you can bypass Varnish by simply turning caching off in Drupal.

Certain paths are never cached, such as for Authorized users (carrying the Authorization header) or where the path is /user, /admin, /ajax and a few others, or the Authorization header is present.

Varnish also does some basic security enforcement by adding headers to outgoing responses to improve browser security. These include:

There are a few other tips and tricks that our Varnish image applies. You can review the Varnish config for full details here.

Tags: caching, containers
Notice something wrong? Shoot us a PR!