Support: 1-800-961-4454
Sales Chat
1-800-961-2888

Rackspace Cloudvent Calendar Day 13: Oops: Purging Objects From The CDN

In the spirit of the holiday season, I’m sharing some tips and features of our cloud that you may not know about. In this countdown I’ll have 24 posts for you, each covering a single topic or feature about Rackspace Cloud products. We’ll post one per day so keep checking back!

If you’re using Cloud Files for object storage in your application you’re likely ahead of the curve when it comes to cloudy architecture. Good for you. However, in this example let’s discuss what happens when instead of uploading your latest hilarious meme to a container to deliver over the CDN, you upload last year’s tax return. OOPS: that’s a lot of personal information speeding around the globe in record time. In this post, I’ll walk you through how to purge that object from the CDN.

First, to understand this post you need to know how a CDN works. We partner with Akamai and our customers use their CDN for content delivery. They have nodes all over the world. When a user in London requests a file from your Cloud Files container in Chicago, a node in London requests the object and caches it for subsequent requests. It will keep serving that object from the node in London until the TTL expires, EVEN IF YOU DELETE THE OBJECT FROM CLOUD FILES. That’s a big problem for our tax return example. Luckily, you can send a request to purge the object from every node’s cache. You can purge up to 25 objects per day.

To purge an object, send a DELETE request:

curl –s –X DELETE –H “X-Auth-Token: $TOKEN” https://cdn.clouddrive.com/v1/1234/CONTAINER_NAME/OBJECT_NAME

You can also add an email address to be notified once the purge is complete with another header:

-H “X-Purge-Email: user@domain.com, user2@domain.com”

The day is saved! Check back tomorrow for more tips and tricks!

About the Author

This is a post written and contributed by Hart Hoover.

Hart Hoover is a Cloud Strategist at Rackspace Hosting. Hoover started his career as a Racker in 2007 as a Linux Systems Administrator, providing technical support for dedicated servers. He moved to the cloud in 2009 to help design the Managed Cloud Servers support model. He has presented at various technical conferences, maintains and contributes to the Rackspace DevOps Blog, and advises Rackspace customers on best practices for cloud computing.


More

Leave a New Comment

(Required)


Racker Powered
©2014 Rackspace, US Inc.