Boost vs Varnish: Which is better for Drupal 7?
Drupal’s content management system powers 951,034 people in 228 countries speaking 181 languages.
This free open-source platform powers millions of websites and applications, from personal to corporate blogs, featuring custom themes and add-on modules and designs for better website performance and user experience.
Similar to WordPress and other CMS systems, Drupal also supports modules for performance improvements such as caching. Two examples that support the latest version of Drupal are Varnish and Boost.
Experienced Drupal administrators can often (through advanced configuration) get these two modules to work together to dramatically speed up the website’s performance. A review of Drupal forums demonstrates some of the creative ways admins are exploring redundancy issues on this popular content management system.
Each individual caching system has a composite set of pros and cons:
Boost on Drupal 7: Advantages and Limitations
Boost provides static page caching for Drupal sites, providing a significant increase in performance and scalability for sites receiving large amounts of anonymous traffic.
On shared hosting platforms many would argue that Boost is the best option. However, it requires advanced configuration to install correctly. The cron and clean URLs should be working correctly, requiring the admin to edit the robots-dot-txt and dot-htaccess files.
Boost supports Apache, HTML, XML, CSS, JavaScript, and JSON/AJAX. However, for Drupal 7, it doesn’t do any active cache expiration. When the admin updates a node or post a comment, “Boost will continue serving stale content from its static HTML cache until the file is finally cleaned up on a cron run.”
Stale content will be served unless the admin visits the performance page and clears out all the cache manually for small websites. For sites with larger volume of nodes or comments being posted, Boost can drain performance, since the module flushes all the cache whenever there’s a new post or comment.
Varnish on Drupal 7: Better than Boost?
On the other hand, Varnish offers a general solution to enhance the site’s performance that can be used to proxy cache other kinds of content aside from Drupal pages like static images and style sheets. Weighing these two modules against each other, Boost is easier to set up than Varnish.
“Varnish also offers the ability to load balance and rewrite requests before they even reach your web server, whereas Boost requests are still hitting the web server.”
Varnish, in terms of performance, is faster than Boost. It can be configured to store cache in its memory and faster than a file system based solution (like Boost).
Varnish can provide a static HTML page, whilst it is undergoing maintenance.
Conclusion
Boost, is easier to set up than Varnish, which may make it better suited to those who don’t want a lot of configuration issues. However, the latter may be considered superior by those who prioritize performance.