Using Varnish Cache: an Introduction and tutorial by Pax Dickinson

 

Varnish Cache

At the brand new Varnish Cache User Group in NYC, Business Insider's Chief Architect, Pax Dickinson, gave a talk entitled "Introduction to Caching with Varnish," part one of a series of talks on Varnish.

Varnish is a front end caching reverse proxy similar to Squid, used for scaling websites to thousands of requests per second. Pax will give a general overview of Varnish, with specific examples, advice, and live production demonstrations based on his experience at scaling Business Insider to over 130 million pageviews a month.


Background on caching

Caching is the mechanism to store some of the common data on disc so that you do not have to make extra server and database calls to get that information. Caching helps site performance and is most commonly used by sites that operate at a high scale. Prior to Varnish, the most common caching solution was something called Squid. But the general problem with Squid was that Squid was a forward proxy. The core architectural difference between Varnish and Squid is that Varnish is a reverse proxy.

Background on Varnish

In the world of caching, Varnish is a relatively new caching solution. It was introduced in 2006. It is an http accelerator. The aim of Varnish is to help improve performance throughout the lifecycle of a request. Varnish enables thousands of requests per second. Additionally, Varnish allows your system to serve pages even if the backend server is down. It serves the pages that are in its cache.

Some advantages of Varnish over its predecessors is simplified configuration and setup, and an ability to dynamically assemble web content by independently caching the components of a single UI page.