ESD_Module 4_Refreshing Akamai..

Report
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.
Powering a Better Internet
©2011 Akamai
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
Powering a Better Internet
©2011 Akamai
Cache Refreshing Mechanisms
To manually refresh content and not wait for TTL expiration, Akamai
provides two basic mechanisms:
1. Purge- based
2. Invalidation- based
Powering a Better Internet
©2011 Akamai
Purge-based Mechanisms
•
On purging content from the Akamai network, edge servers will reretrieve 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.
Powering a Better Internet
©2011 Akamai
Invalidation-based Mechanisms
•
Invalidation-based mechanisms cause Akamai edge servers to revalidate 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
Powering a Better Internet
©2011 Akamai
Tools to Refresh Content
Akamai provides these tools on Akamai EdgeControl to purge and
invalidate content:
1. Content Control Utility (CCU)
2. Enhanced Content Control Utility (ECCU)
Powering a Better Internet
©2011 Akamai
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.
Powering a Better Internet
©2011 Akamai
Accessing the CCU
Powering a Better Internet
©2011 Akamai
Using the CCU
Powering a Better Internet
©2011 Akamai
Using the CCU (Cont…)
Powering a Better Internet
©2011 Akamai
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.
Powering a Better Internet
©2011 Akamai
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.
Powering a Better Internet
©2011 Akamai
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.
Powering a Better Internet
©2011 Akamai
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.
Powering a Better Internet
©2011 Akamai
Accessing the ECCU
Powering a Better Internet
©2011 Akamai
Using the ECCU
Powering a Better Internet
©2011 Akamai
Comparison of Tools
Tool
Description
CCU
A web page on Akamai EdgeControl that allows
you to specify objects to remove from cache, or
to remove objects by CP Code.
CCU API
Same as the CCU UI, but a SOAP-based API.
ECCU
A web page on Akamai EdgeControl that allows
you to specify refreshing objects by rules
involving path and file extensions.
ECCU File Upload
Using the ECCU Web UI, you can upload ECCU
files containing rule-based instructions beyond
path and extension.
ECCU Publisher
An EdgeControl Web Service SOAP-based API
that allows you to upload ECCU files.
Powering a Better Internet
©2011 Akamai
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
Powering a Better Internet
©2011 Akamai
Lab 5 - Refreshing Cache
Powering a Better Internet
©2011 Akamai

similar documents