Varnish Configuration Language (VCL)
Last updated 2020-06-10
Fastly Varnish Configuration Language (VCL) is a domain-specific language derived from the Varnish proxy cache, which is part of Fastly's platform architecture.
When you create and enable a VCL service via the web interface or the API, Fastly generates VCL code automatically for the functionality you've specified. You can refine and augment that functionality as needed to create customized configurations by defining your own VCL logic and combining it with the automatically generated VCL. Those configurations are then distributed to all Fastly caches worldwide, loaded, and activated without requiring maintenance windows or service downtimes.
Fastly VCL provides a variety of language components, which we document in our VCL reference documentation. The documentation describes each component, including its syntax and structure where necessary. Where applicable, examples of each component's use are included.
You can create a custom VCL configuration to augment or override the default VCL configuration for your service. To make using custom VCL easier, we maintain a VCL boilerplate that you can use as a starting point when including your own VCL logic. You can use the web interface to upload custom VCL files for your service as well as preview it prior to activation.
VCL Snippets are short blocks of VCL logic that can be included directly in your service configurations. They're specifically designed to allow you to add small sections of code when you don't need more complex, specialized configurations.