3

Is Pressflow really required for Varnish? I ask because I've set up Varnish on my server with drupal 6.30 standard, and installed the Varnish module, and it's sped up my website no end. Really amazing speed results here, and I'm getting plenty of cache hits.

So my question, what's different about the Pressflow install, and why is it required for Varnish?

2 Answers 2

3

Varnish and Pressflow are two different things.. Pressflow uses varnish to improve performance.. More details goes below..

Pressflow is “a derivative of Drupal core providing enhanced performance, scalability, and data integrity”. Basically, some really smart guys at Four Kitchens and elsewhere back-ported a bunch of Drupal 7 performance enhancements to the Drupal 6 (and even Drupal 5!) code base.

Pressflow adds the following features to Drupal.

  • Support for database replication
  • Support for Squid and Varnish reverse proxy caching
  • Optimization for MySQL
  • Optimization for PHP 5

What: Varnish is an HTTP accelerator and caching reverse proxy. Varnish is all about speed. It stores as much content as it can in the fastest place possible – RAM in this case – and bypasses the expensive process of making a request to Apache.

Why: Pressflow structures the Drupal content to be more cache-friendly, but we still need something to actually cache the content.

How: Varnish sits in front of Apache, accepts incoming connections from browsers and, if possible, fulfills the requests from its cache. If it can’t, it passes the request on to the underlying Apache/PHP stack. It then takes the response from Apache and forwards it on to the requesting browser. If the response from Apache is cacheable, Varnish stores it in RAM for fulfilling future requests.

3
  • Thanks for the response, interesting. It says 'Pressflow adds support for varnish cache', but it is working on my server anyway with standard Drupal? Commented May 2, 2014 at 10:47
  • 1
    I would just clarify the first paragraph to say that Pressflow can use Varnish. You can run Pressflow w/o it, too.
    – mpdonadio
    Commented May 2, 2014 at 12:55
  • My understanding is that you can effectively run Varnish on ANY web app. Which is why standard Drupal still works with it, as it's just a reverse proxy (Varnish that is) Commented May 2, 2014 at 15:06
1

Hmm. According to the Varnish documentation: Varnish and Drupal:

Using Varnish with Drupal prior to version 7 will require the use of Pressflow, which backports Drupal 7's lazy session creation and other important performance enhancement. Without this, Drupal will create a PHP session cookie for all users, meaning Varnish is reduced to caching static files only.

This seems to contradict the statements made in the answers in this thread.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.