Overview of the Fastly CDN module for Magento2
masterThe Fastly_Cdn module connects a Fastly.com account with a Magento 2 commerce shop to leverage enhanced caching and Geo-IP capabilities.
It operates using two primary components:
- Magento2 Module: Extends Magento's native page cache and Varnish capabilities by adding specific
Cache-Controlheaders to every response. - VCL (Varnish Configuration Language): Configures Fastly's Varnish service to process client requests and Magento HTML responses based on the headers provided by the module.
Key features include:
- Geo IP Detection: Enables regional store delivery based on the client's IP.
- Serving Stale on Errors: Serves expired content if the origin returns an error, preventing visible site outages.
- Serving Stale while Revalidating: Serves expired content while simultaneously refreshing it from the origin to maintain performance.
- Soft Purging: Marks content as expired before its TTL, allowing the cache to serve stale content while actively freshening it.