Learn to build on the Fastly platform

Fastly offers two types of edge services: highly performant and configurable delivery services powered by Fastly VCL, and next generation Wasm-powered Compute@Edge services:

AvailabilityGeneral availabilityGeneral availability
Language supportFastly VCL, a derivative of Varnish Configuration LanguageAny language that compiles to WebAssembly (with SDK support for Rust, JavaScript, and Go)
InvocationFastly invokes your code at multiple predefined points in the request-response cycleYour code handles the entire request-response cycle
Making backend requestsRequests to statically-defined backends are automatically triggered by client requests (unless aborted by error or restart).Requests to backends are made explicitly by your edge code using the fetch method of your chosen language SDK. Backends can be defined statically or created at runtime.
Caching responsesHTTP cache directives are used by default but caching policy can be modified at the edge. Responses can be inspected and headers and caching decisions can be modified in vcl_fetch before the response is written to cache. No access to response body.HTTP cache directives alone are used to determine cache policy. Response is only accessible after being written to cache, but can be fully inspected and modified (including the body) before delivery to the client.
Common capabilitiesLogging, Streaming, Request collapsing, Purging, Serving stale, Edge dictionaries, Geolocation & device detection
Unique capabilitiesClustering
Image optimizer
Rate limiting
Load balancing
Segmented caching
Dictionaries and ACLs
General purpose compute
Content transformation
Async fetch
Request composition
Parsing and serialization
Learn more about VCL >Learn more about Compute@Edge >

Whichever service type you choose, many concepts are common. And while not all Fastly features are supported by Compute@Edge yet, many more will be added in the coming months.

Core concepts

Domains are hostnames that point to your services on Fastly. Backends are hostnames that point to the origin servers hosting your application. Health checks are pre-configured requests that Fastly POPs should make, to your backends, to confirm that they are ready to receive end user traffic.

Illustration of domains and backends

Domains, backends, and health checks can be configured in multiple ways:

DomainsBackendsHealth checks
Using the fastly CLIfastly domain createfastly backend createfastly healthcheck create
Using the APICreate domain endpointCreate backend endpointCreate health check endpoint
Using VCLCannot be managed in VCLbackend { ... } declarationPart of a backend { ... } declaration
Using the web interfaceSee Managing domainsSee Managing originsSee Working with health checks

Content served through Fastly is cached based on freshness rules you define in Cache-Control headers, or in the configuration of your Fastly service. Within each Point of Presence (POP), many servers act together in a cluster to provide a single large, efficient pool of cache storage.

Fastly POPs operate independently of each other and forward requests to your origin server if a request cannot be satisfied in that POP. Similar requests arriving at the same time in the same POP are collapsed and only one is forwarded. However, using shielding you can opt to focus all origin requests from across the Fastly network to a single Fastly POP, greatly reducing origin traffic, especially if your customers are spread globally.

Our purging system allows objects previously cached by Fastly to be marked stale or invalidated entirely. Globally purging an object takes around 150ms.

For more information on the key mechanisms that make up Fastly, learn more about core concepts.

Dynamic configuration, data storage and caching

Our edge cloud stores data which is accessible to your Fastly services.

Learning to code on Fastly

Because you can write your own code in a Fastly service, there are an infinite set of tasks you could choose to do at the edge. Start with our onboarding guides for VCL or Compute@Edge, and then try some tutorials or copy some of our code examples.

When you're ready to level up and test your knowledge, try your hand at our code challenges!