Simple scales better and faster in the real world

The Super Fast Purger was conceived as a plugin for the Varnish Administration Console. The current implementation is capable of receiving and distributing 45.000 cache invalidation requests per second with ease. We believe that the upper limit of the throughput for the Super Fast Purger is yet to be determined as the software implementation was limited to network and hardware capabilities during benchmarking.

This is a story of how to scale better and faster by keeping it simple. It is told through our marquee high performance Varnish Cache invalidation feature, also known as the Super Fast Purger, written in Java, that is with ease capable of 45.000 cache invalidations per second using only basic HTTP.

The challenge of super fast cache invalidation

 The story started by one of our customers from within the finance sector approaching us with a request for building the possibility of delivering lightning fast cache invalidation from within the Varnish Administration Console (VAC). More specifically the customer needed cache invalidation that could handle a minimum of 2.000 requests per second. The challenge we were faced with was hence to design a process that could deliver purges (cache invalidations) to the user as soon as the purge was run and to multiple geographically distributed Varnish Cache installations.

Simple outperforms complex

To resolve our challenge we developed two prototypes. The first was a highly concurrent and sophisticated prototype with 0MQ, Protobuffer and Disruptor as key components. The second prototype was a development without any external packages, APIs or frameworks. By utilising only native Java 1.6 SE, a subset of HTTP 1.1 protocol was implemented and a simple HTTP server was conceived as the RESTful platform to handle purge requests. With stark contrast in development approach and technology choices, the two prototypes were benchmarked, tested and compared. And to make a long story short we could conclude that the simple HTTP server as a RESTful platform outperformed the highly sophisticated and concurrent prototype by a factor of 100. We had a winner!

45 thousand cache invalidation requests per second

The Super Fast Purger was conceived as a plugin for the Varnish Administration Console. The current implementation is capable of receiving and distributing 45.000 cache invalidation requests per second with ease. We believe that the upper limit of the throughput for the Super Fast Purger is yet to be determined as the software implementation was limited to network and hardware capabilities during benchmarking.

So this was our story of how to scale better and faster by keeping it simple. You can watch the entire story of our Super Fast Purger and how simple scales faster and better here (this is a presentation I did at the recently passed Javazone summit in Oslo).

13/09/13 11:19 by Yves Hwang

All things Varnish related

The Varnish blog is where the our team writes about all things related to Varnish Cache and Varnish Software...or simply vents.

SUBSCRIBE TO OUR BLOG

Recent Posts

Posts by Topic

see all

Varnish Software Blog