We've been making changes to how we organize and display our docs. Our work isn't done but we'd love your feedback.

Fastly VCL reference

Fastly's Varnish is based on Varnish 2.1 and our Varnish syntax is specifically compatible with Varnish 2.1.5. The principal configuration mechanism of Varnish software is the Varnish Configuration Language (VCL), the scripting language used to configure and add logic to Varnish caches. Fastly has included a number of extensions to VCL that won't be covered by any other documentation.


  Reference

Functions

Functions available in Fastly VCL.

Variables

VCL variables supported by Fastly.

Local variables

Fastly VCL supports variables for storing temporary values during request processing.

Operators

Fastly VCL provides various arithmetic and conditional operators.

Types

Fastly VCL is a statically typed language. Several types are available.

Directors

Fastly's directors contain a list of backends to direct requests to.

Rounding modes

Fastly VCL provides access to rounding modes by way of independent functions for rounding values.


  VCL スニペットを使用する

レギュラー VCL スニペットを使用する


  カスタム VCL

Fastly VCL とカスタム VCL の混在とマッチング

  Categories

Content negotiation

Functions for selecting a response from common content negotiation request headers.

Cryptographic

Functions for cryptographic- and hashing-related purposes.

Date and time

Variables and functions that provide flexibility when dealing with dates and times.

Edge Side Includes (ESI)

Variables that allow you to track and control requests with ESI.

Floating point classification

Floating point classification functions.

Geolocation

Variables that provide the ability to search a geolocation database for a given host or IP address.

Math constants and limits

Features that support various math constants and limits.

Math rounding

Rounding of numbers.

Math trigonometric

Trigonometric functions.

Miscellaneous

Miscellaneous features that don't easily fit into other categories.

Query string manipulation

Functions for query-string manipulation based on Dridi Boukelmoune's vmod-querystring for Varnish.

Randomness

Functions that support the insertion of random strings, content cookies, and decisions into requests.

Server

Variables relating to the server receiving the request.

Size

Variables that give more insight into what happened in a request.

Table

Functions that provide a means to declare a constant dictionary and to efficiently look up values in the dictionary.

TLS and HTTP/2

Variables that expose information about the TLS and HTTP/2 attributes of a request.

UUID

Functions that provide interfaces for generating and validating unique identifiers.