What is CDN purging?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Purging is a command to the CDN to stop serving a file from cache. For instance, by making a purge for /images/screen.png, you instruct the network to invalidate this cached picture on all CDN servers globally. When the purge is finished and a visitor requests the purged file, the network will make a conditional request to the main server. Then the origin server will respond by delivering the newer file versions which edge server will cache and serve to visitors.

Some content delivery networks do not invalidate files – they are just deleted from cache. Only a few CDNs perform both. Regardless of purge, the origin should always deliver objects to the CDN with last-modified header. Without it, CDN wouldn’t be able to make conditional requests, and will fetch the whole object from the origin to reply on user request from an expired object. As the result, cache miss responses will be slow, and extra data will be sent over the wire. Sending of the last-modified header accelerates communication between the origin and CDN.

Every CDN provider has its own purging features:

  • Purge type: is the object deleted from cache, or it is invalidated (expires in cache)?
  • Purge time: most CDN services do not purge files instantly, but it may take several minutes. For example, networks of Verizon Digital Media Services purge quickly (10-30 seconds), but sometimes purging may be incomplete within 60 seconds – they let users know when the purge has finished.
  • Purge assurance: some providers let user know that purging of objects has been finished on all CDN PoPs.
  • Purge capabilities (by file, all files, per directory, by extension, tag or key). Not every CDN company has all these capabilities. Verizon supports purging by file extension.
  • Purge costs: some provides charge for purging, if you exceed the limit number of purges per month.

Now you know what purging is: update of files in CDN cache servers. This is an important feature that ensures relevance of content and makes up for good user experience.

Vadim Kolchev

52 publications

Vadim has graduated from Moscow Institute of Entrepreneurship and Law as finance and credit specialist. Prior to starting to work in hosting business directly, he occupied various roles in several companies, including but not limited to banking sphere and sports. As of 2015 he works for INXY Holding, with SpaceCDN being a vital part of the hosting branch of its business. Being tech enthusiast, he has started writing articles about dedicated servers, CDN, storage solutions and other hosting services long ago, and since then accumulated a lot of experience and knowledge in the field. Building hosting sales and support departments from scratch has added even more experience and knowledge and allowed to see the business from the inside and build required expertise. Now Vadim is CPO and COO of a successful hosting business. Having several important interviews and publications at platforms such as Hosting Journalist and Forbes, he continues to share knowledge about this branch of technology that has become not only his job but also a passion.

Learn more about us
in social networks