Varnish - Journey from Beginner to Proficient
Performance has always been a challenge that every new site faces irrespective of the technology in which it has been built. Performance of the site is of paramount importance because the website will not receive the desired visibility among its audience if it is slow. As an industry standard and based on statistics we already know that Loading time is a major contributing factor to page abandonment. Page abandonment increases upwards from 25% as the page load time increases from 4 seconds.
To increase the performance of the site, general thought process is to add additional resources (RAM, CPU, servers etc.), but that not only hits your pocket, but also requires some time to configure, test and finally deploy on production.
So, what is the solution?
One of the quickest solution without investing any money is to install Varnish. Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. It is installed in front of any server that implements HTTP protocol and configure it to cache the contents. It is used by high-profile, high-traffic websites including Wikipedia, online newspaper sites such as The New York Times, The Guardian, The Hindu, Corriere della Sera, social media and content sites such as Facebook, Twitter, Vimeo, and Tumblr. Of the Top 10K sites in the web, around a tenth use the software.
To understand Varnish, pre-requisite is to understand the basics such as:
- What is proxy or reverse proxy,
- Why and when we should be requiring varnish.
- What are its features.
For intermediate level:
- How to run HTTPS sites in Varnish
- How Ngnix is configured for Varnish
- How to configure Varnish for PHP application
- How to configure Varnish for Drupal
For advanced level:
- Varnish as a load balancer
- Understanding varnish file and default.vcl file
This session will cover all levels stated above (basics, intermediate and advanced) only assumes familiarity with basic drupal caching concepts.
What we'll discuss:
-
What is Varnish
-
Proxy vs Reverse Proxy
-
What does Varnish do?
-
Varnish Licensing
-
Varnish Features
-
HTTPS with Varnish- Ngnix
-
HTTPS with Varnish- Apache
-
ESI
-
Varnish Installation
-
Varnish File Explained
-
VCL-Varnish Configuration Language
-
Default VCL explained
-
Configuring Varnish for PHP
-
Configuring Varnish for Drupal
-
Useful Commands For Varnish
-
Debugging Varnish
-
Demo