Fastly is the front door of every Adobe Commerce Cloud store - CDN, WAF, image optimiser and cache layer in one. It ships preconfigured, but “preconfigured” is a starting point: the stores that get real value from Fastly tune a handful of settings and understand its caching model. Here is what matters.
How Magento and Fastly Interact
Magento sends cache tags (X-Magento-Tags) with every response; Fastly stores pages keyed by those tags. When content changes, Magento issues tag-based purges - a product update purges exactly the pages showing that product, not the whole cache. This is why Commerce Cloud can run aggressive TTLs safely: invalidation is precise. Protect that mechanism - custom code that bypasses tag purging (direct SQL writes, custom blocks without identities) is how stale content bugs are born.
The Settings Worth Touching
In the Fastly module config (Stores > Configuration > Advanced > System > Full Page Cache > Fastly):
- Stale-while-revalidate / grace: serve stale content while revalidating - the difference between a backend blip and visible downtime. Configure “stale if error” generously; it is your resilience layer
- Shielding: route origin fetches through one shield POP - dramatically reduces origin load during cache misses and purges
- Soft purges: mark content stale rather than destroying it, letting grace serve while fresh content regenerates
Image Optimisation
Fastly IO (enable in the same config) converts and resizes images at the edge from URL parameters - WebP/AVIF negotiation included. This replaces an entire class of image pipeline work: originals stay in media storage, variants are computed on demand and cached at the edge. Turn it on, verify your theme requests sized variants, and check the IO shield settings - done.
VCL Snippets: The Sharp Tool
Custom VCL snippets handle what config cannot: geo redirects, bot blocking, header normalisation, maintenance-mode bypasses. Rules for survival:
- Snippets run on every request - keep them cheap
- Version and test them in staging; a broken snippet can take the whole storefront down
- Prefer the built-in configuration wherever it exists; VCL is the escape hatch, not the first tool
ESI and Personalisation
Edge Side Includes hole-punch cached pages for dynamic fragments. Magento uses this sparingly (customer-data sections cover most personalisation client-side) - if you add ESI blocks yourself, understand that each one is an origin fetch inside an otherwise cached page.
Verify What You Assume
Fastly’s analytics (requests, hit ratio, origin time) answer the real questions: is the hit ratio above 90 percent? Where do misses come from? Is origin time creeping up after releases? A monthly look at these three numbers catches most CDN-layer problems while they are still cheap.
Fastly on Commerce Cloud is one of the licence’s genuine value pieces - but only for merchants who configure grace, shielding and IO, and watch their hit ratios. Set it, verify it, and let the tags do the invalidation work.