You appear to be offline. Some site functionality may not work.

Fastly Blog

Varnish

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….

Creating originless & cloud-based services with Fastly + Terraform

In a previous post, HashiCorp’s Seth Vargo introduced the Terraform infrastructure-as-code tool for building, changing, and versioning infrastructure. In this post, we’ll cover two cases using Terraform with Fastly: first we’ll create and manage an…

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...

A/B testing at the edge

A/B testing is valuable, aggravating, and everyone has an opinion on the best way to do it. At Fastly, we provide a set of tools to help enable experiments you can integrate into your own…

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.

Improvements to Edge Dictionaries

We’re continuing to build on our unique ability to push your logic and decisions to the edge, and are happy to announce some exciting enhancements to our Edge Dictionaries. Our latest improvements include Upsert functionality…

Introducing fastly2git: version change visualization

Sales Engineer Léon Brocard created fastly2git, a Git repository for Fastly service changes, making it easy for you to see differences between versions. In this post, Léon discusses how fastly2git works, and how it can…

Restricting access to content

In this blog post, Vladimir Vuksan outlines three common methods you can use for blocking or limiting access to content with Fastly.

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…

The benefits of using Varnish

At the core of Fastly is Varnish, an open source web accelerator that’s designed for high-performance content delivery. Varnish is the key to being able to accelerate dynamic content, APIs, and logic at the edge….

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…

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…

Surrogate Keys: Part 2

One of my favorite computer science jokes is that there are only two truly difficult problems in computer science: naming things, cache invalidation, and off-by-one errors. At Fastly, we deal with these sorts of difficult...