Leveraging the browser cache with Fastly’s CDN
Since a CDN is essentially a cache, you might be tempted to avoid complexity by not making use of the browser cache. However, each cache has its own advantages that the other does not provide….
Leveraging the browser cache with Fastly’s CDN
Since a CDN is essentially a cache, you might be tempted to avoid complexity by not making use of the browser cache. However, each cache has its own advantages that the other does not provide….
How to solve anything in VCL, part 3: authentication and feature flags at the edge
In “How to solve anything” parts 1 and 2, we outlined how to use Varnish Configuration Language (VCL) to address some of your more challenging problems. In this post, we’ll discuss how Andrew...
How to solve anything in VCL, part 2: SOA routing and non-ASCII
In “How to solve anything, part 1,” we discussed Andrew Betts’ clever tips for using Fastly’s Custom Varnish Configuration Language (VCL) to collect data at the edge. In this post, we’ll look at how...
How to solve anything in VCL, part 1: collecting data at the edge
At our second annual customer summit, Andrew Betts of the Financial Times discussed using VCL to “solve anything” — pushing his team’s problems to the CDN layer.
Caching with CORS
Before diving into CORS (Cross-origin resource sharing), I need to mention JSONP, which is the other solution to getting data from a different “Origin.” In Using ESI, Part 2: Leveraging VCL and ESI to...
The VCL Cookie Monster
This month’s tip is more a theoretical exercise than anything else, just to show the power of VCL, and to explain a few regular expressions. I’m going to discuss VCL that deletes cookies.
Reusing backend connections to increase performance
Reusing connections between your Varnish instance and your backends (origins) is a good idea for multiple reasons. If your Varnish is on the same network as your backends and you’re doing low volume traffic, you…
Common causes of a poor cache hit ratio and how to deal with them
The cache hit ratio (or hit ratio for short) is the ratio of hits to cacheable requests (hits and misses combined). There’s also cache coverage, the ratio of cacheable requests to all requests (cacheable requests…
Analyze your origin logs to get a higher cache efficiency
If you want to increase the efficiency of your Varnish (or Fastly) cache, you need to figure out what traffic is not cached. By definition, any traffic that reaches your origin is not cached, and…
Normalizing the Host Header
In the continued quest to increase cache hit ratios, the chant is: “Normalize, normalize, normalize.” Less variation in your requests means you have a higher chance of getting hits. This month’s highlight is the Host…
Overriding Origin TTL in Varnish, or My Beginner's Mistake
A long time ago, I was helping out at a gaming conference where there was an intranet CMS using a Twitter search plugin. Unfortunately, the rather saturated Internet connection was slowing down all of the…
Increase Your Hit Ratio With This Simple Tip
If you’re caching URLs that include user input, such as a search box, and the search is case insensitive, there’s a really easy way to increase your hit ratio: convert the URL to lowercase.
Using Boltsort to Make API Caching More Efficient
There's a Fastly module available called "boltsort" which allows you to easily sort the parameters in the query string, so that you will always end up with the same URL, no matter what...
Best Practices for Using the Vary Header
Vary is one of the most powerful HTTP response headers. Used correctly, it can do wonderful things. Unfortunately, this header is frequently used incorrectly, which can lead to abysmal hit ratios. Worse still, if it’s…
Test New Encodings With Fastly, Including WebP
At Fastly, we believe that the freedom to experiment is what makes the web great. We’re excited by the cutting edge breakthroughs in file encodings that are happening almost every day, making the web better…