220 likes | 570 Views
Module 4 - Refreshing Content in Akamai Server Caches. Objectives. After completing this module, you will be able to: identify the mechanisms available to refresh your content cached in Akamai edge servers. use the tools that Akamai provides to refresh content. plan for origin downtime.
E N D
Objectives After completing this module, you will be able to: • identify the mechanisms available to refresh your content cached in Akamai edge servers. • use the tools that Akamai provides to refresh content. • plan for origin downtime.
Introduction When a client request is made, Akamai edge servers contact the origin under the following circumstances: • When the requested objects are not in cache • If the requested object is marked as no store • It the time to live or TTL of the object has expired
Cache Refreshing Mechanisms To manually refresh content and not wait for TTL expiration, Akamai provides two basic mechanisms: • Purge- based • Invalidation- based
Purge-based Mechanisms • On purging content from the Akamai network, edge servers will re-retrieve content from the origin on the next request. • The Akamai edge server: • removes the object from cache. • on the next request, sends a full HTTP GET request to the origin to fetch objects. • refreshes the cache with fresh content.
Invalidation-based Mechanisms • Invalidation-based mechanisms cause Akamai edge servers to re-validate the freshness of content with an IMS GET on the next client request. • On receiving a client request, edge servers: • send an IMS Get request to the origin to fetch objects. • remove and replace cached object only if newer version is available
Tools to Refresh Content Akamai provides these tools on Akamai EdgeControl to purge and invalidate content: • Content Control Utility (CCU) • Enhanced Content Control Utility (ECCU)
Content Control Utility • Allows you to specify the objects to remove from cache by URL, ARL, or by CP Code. • Benefits: • Easy to use interface • Requests can be removal or invalidation based • Provides the option of receiving email notifications of the result of your refresh actions • Disadvantage: You must specify each object to be removed; you cannot specify a directory by wildcard.
Accessing the CCU Demo
Using the CCU Demo
Using the CCU – Purging by CP Code • Be mindful that removing or invalidating all objects under a CP code can cause high load on your origin server.
CCU – Important Points to Remember • Purge and invalidation-based requests using the CCU take approximately 10 minutes to take effect. • Files submitted for CCU requests should not contain more than 100 URLs each less than 400 characters in length. • If you receive a “Request Entity Too Large” error, split your file into smaller files and try again. • You can submit any number of files containing about 100 URLs, but there cannot be more than 10,000 outstanding requests at any one time. • If you receive a Code 332 error, which indicates you have exceeded this limit, wait for about 10 minutes and try again.
Content Control Utility API The CCU API: • can be used to write programs that submit a list of cached objects to be removed from the Akamai network. • uses SOAP, HTTP or HTTPS, and either the removal-based or invalidation-based refresh method. • is typically used in one of two ways: • to develop a GUI for those who manage Web content, rather than providing access to Akamai EdgeControl. • to integrate the API into a content management system.
Enhanced Content Control Utility • ECCU provides for invalidation-based refresh by rules such as date or time, path, file extension, or more complex criteria. • There are three ways to use the ECCU: • As a web interface on Akamai EdgeControl • File upload, using a function on Akamai EdgeControl • ECCU Publisher or Publish ECCU Note: • Invalidation-based refreshing is the only option for refreshing content if you are using the ECCU. • An invalidation based request will take approximately 30-40 minutes to complete.
Accessing the ECCU Demo
Using the ECCU Demo
When to Use the CCU and ECCU CCU: • For refreshing specific URLs • If there are more than about 10,000 objects, - allows you to purge by CP code ECCU: • When you can identify objects by directory or file extension. Important: Ensure that you update the content on your origin server before submitting a content refresh request