Level3 Content Delivery Network (CDN) doesn’t offer option to purge cached content on edge servers. That what Level3 offer, is to invalidate content for specified path on your property (website) which can be done through Level3 mediaportal. Content invalidation is not instant, and it may take few minutes for servers to process your request.
Content Invalidation can be done through Level3 mediaportal -> Network Tools -> Content Invalidation, where you can choose your Access Group, Caching property or Streaming ID and Path. To invalidate all content for chosen property, you have to use path “/*”. To view your current requests for content invalidation, choose “Invalidation Status” from Actions menu, which is to the left side of Content Invalidation page.
Things that you should be aware of, when dealing with Level3 Content Invalidation:
1) Level3 content invalidation is not instant, and it may take few minutes for servers to process your request. Also, content invalidation task is not processed by Level3 mediaportal itself, but it is queued and processed by back-end servers (if you choose to be notified by e-mail once your request is processed, you can find out that e-mail notification for invalidation is at least few minutes behind, as notification is sent by mediaportal, once it receive information back from back-end servers after your request is processed).
2) Level3 Content Invalidation has nothing to do with purge, it just tells to all end web servers (edge servers), that content you’ve specified has to be re-validated whenever it’s possible. If client connecting to Level3 requesting content that you invalidated, Level3 edge server will send request your origin server and try to refresh requested url, and now… what happen in different scenarios:
– your webserver is down, so edge server can’t get new content -> Level3 will still serve old cached content to client.
– your webserver is too busy to respond on time (“HTTP Error 503 – Service unavailable”), Level3 still serve old cached content to client.
– your webserver response is 200 -> Level3 will pass new, fresh content to client.
– your webserver response is 404 (“HTTP 404 – File Not Found”) -> Level3 will pass 404 to client.
While dealing with Level3 content invalidation, you may get to the point when you will think about your website maintenance, how to deal in this case? Imagine situation where you’ve to do full site maintenance, bring it down for an hour or two, and the last thing you want is your Content Delivery Network (Level3 in this case) serving partial content to clients. Partial, because not every Level3 server has full site cached, also you could decide to do not cache all your content (these days, most of sites offer services for logged in users, so you can’t really cache everything). You shutdown your servers, you did Level3 Content Invalidation… but Level3 still serve some of the pages! So how you can do your maintenance and effectively manage Level3, so that user experience with your site is not affected, and users doesn’t complain that some pages works, some doesn’t?
Solution may be to configure your server to return 404 (“HTTP 404 – File Not Found”) for every request. If your site is based on Apache and PHP, it can be done through basic mod_rewrite rule:
RewriteRule ^(.*)$ /404.php [QSA]
that catch all requests and pass it to PHP script with:
<? Header(“HTTP/1.0 404 Not Found”); ?>
Alternatively, you can use this rewrite rule, and point it to your maintenance.php page, that display information about maintenance. Effect will be exactly same, client will get your 404 or maintenance page, and never old cached content.