Is Varnish The Key for a High Performance Drupal Website?

Submitted by Sara Parks on 04/15/2014 - 02:19:pm

If you want to learn about caching tools, you have come to the right place. With so many different options, it can be very confusing to know which one is the best one for your situation. While I will discuss different options, I want to recommend Varnish as an ideal tool that works well with Drupal websites because it scales right along with the CMS and integrates seamlessly into the framework.

Some websites need a more robust solution, like Varnish, that boosts performance for any size website and scales to provide support in the toughest situation. Other websites just need a quick fix while they get going on their feet. There is caching software for each situation and for both types of website users, anonymous and logged-in that I will also cover.

Breakdown of Varnish Cache

Varnish is a proxy server that sits between your Drupal server and the end-user's computer. This server caches content by storing a copy of every web page. Each web request is filled with cached content and doesn't have to travel all the way to the backend server to build a web page every time. Users are served content quicker, and enjoy their experience a lot more now that they can navigate quickly through the site.

The image below depicts the different caching tools I will cover. I want to preface this by explaining my definition of simple and advanced. By simple, I mean they are relatively quick fixes and don't require access to backend processes. With the advanced ones, those require root server access and thus do not work on shared hosting.

Caching Tool Options and Use Cases

I will cover a few of the major, popular, caching softwares, modules and other options.

  1. Drupal caching works great and comes standard with any Drupal core install. While it does comes standard, it is not automatically turned on and should be as soon as possible. This is the first step when you create a website and can give a boost in speed and performance without much effort. We always turn this on for our clients because it is a start in getting the ideal level of performance and speed for your website.
  2. Boost is a Drupal module that works for websites using shared hosting. It is utilized when websites cannot have specialized servers configured exactly to their needs and need a powerful option that still delivers on performance.
  3. Memcache is a commonly used option for websites that have lots of logged in users that require dynamic content. It caches and serves dynamic content by working with the backend Drupal database server to compile each request. While it is not as powerful as Varnish, that is only because it serves dynamic content that cannot be entirely cached and has to be compiled upon request every time.
  4. Varnish provides the boost for large-scale websites. It is a service that integrates with Drupal through an API and sits in front of the Drupal backend server. For bigger projects, it is setup using caching servers and load balancers that direct anonymous traffic to the caching servers. Varnish scales well by accommodating large spikes in traffic with a reserve set of servers that can be turned on automatically.

Is Varnish Right For You?

If you are planning to grow, either quickly, or even steadily, Varnish is a great option and provides great support for the biggest and toughest changes. We also have a service called ClikSpeed that uses Varnish plus a little extra that you can setup and run without having to worry about maintaining it. Clikspeed works with both shared and independent server systems to help multiple situations increase performance.

Photo By Gabriel Pollard