Search

Summary

Summary

In real-world scenarios in which cookies are omnipresent, and where authentication is sometimes required, Varnish can take on a much bigger role than you might think.

VCL is not only there to decide what and what not to cache; this chapter has proven that VCL is at the heart of decision-making on the edge.

Hole punching techniques such as ESI and AJAX are common practices these days. They chop up a single HTTP response into a main response and a number of fragments, each with their own VCL behavior and TTL.

Although this is a great improvement in comparison to the return(pass) behavior that would otherwise occur when cookies are present, the non-cacheable subrequests still have to access the origin.

This chapter has proven that Varnish can perform some basic logic and interact with third-party party systems.

VMODs like vmod_xbody, and vmod_edgestash have proven to be excellent utilities for changing the response body. vmod_http is like a Swiss army knife that offers many options to interact with external systems.

The VCL examples in this chapter also relied heavily on key-value stores. The local key-value store that was powered by vmod_kvstore was featured a lot, but vmod_redis was by far the most powerful key-value store. The fact that Redis is distributed makes it an excellent tool for bridging the gap between the origin and Varnish in terms of stateful data.

This example also hinted at other use cases beyond basic web acceleration: there were API examples, and examples in which Varnish served as an authentication gateway. The next chapter is all about alternative domains of application for Varnish.

Chapter 9 is the last real chapter of this book and focuses on Varnish as CDN software. As the internet continues to evolve, and as the need for low latency and high throughput at scale continues to become more important, Varnish will become the foundation of your content delivery strategy.

We’ve come a long way. Let’s bring it all together in chapter 9.


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203