CDN invalidation

Content Delivery Networks (CDN) are services that speed up distribution of static and dynamic web content by storing them in data centers around the world and routing the end-user to the location with the lowest access time delay.

The most popular CDN services include AWS CloudFront, Cloudflare, Google Cloud CDN, and DigitalOcean Spaces CDN.

CloudFront in AWS action rosterCloudFront in AWS action roster

Success
With Buddy, you can optimize the performance of your websites by automatically clearing the cache of your CDN services upon the deployment.

Common use cases

  1. A new version of the website was uploaded and the cache requires an update
  2. A bad version of the file was cached and an update needs to be redeployed to the server
  3. Too many files have been cached and needs purging (although this shouldn't happen if done via a pipeline)

Configuration

Configuration is very easy and requires selecting the integration and the cache to purge:

Google CDN action detailsGoogle CDN action details

Purge mode

The Invalidate tab also lets you specify if you want to purge everything, paths listed in the repository/filesystem changeset, or individual paths specified by the user:

Google CDN action detailsGoogle CDN action details

Warning
Please mind that invalidation requests can be very expensive, so make sure to set a limit in order to protect your budget. If the number of files to invalidate exceeds that limit, we will purge all files in this distribution instead of invalidating every single file.
Last update:
Apr 19, 2024