Manuel Alvarez

Async Refresh: Your best friend when caching with Short TTL or using First Party Analytics

Blog Post created by Manuel Alvarez Employee on Nov 2, 2014

Prefresh or Async Refresh allows the Akamai Server to refresh the content with an If-Modified-Since requests before its TTL expire. It is a powerful caching feature you must consider when developing your caching strategy.

 

How does it work?

When defined period or percentage of the object TTL has expired (meaning that the content is valid and can be served from cache), and a client requests is received, the Akamai Edge server sends an If-Modified-Request (or If-None-Match if Etag support is enable) to the origin at the same time it responds to the client. The origin response will either revalidate or replace the content.

The object is synchronously refreshed if the client request is received when its TTL expires.

 

What is the benefit?

With prefresh clients do not have to wait for roundtrips to the origin while the content is getting refreshed. It provides a good balance between performance and freshness.

 

How does it help my analytics?

For first party beacons, you can set prefresh to 0% to force the Edge to asynchronously refresh the content on every request - resulting on a quick response to the client while allowing the origin to collect any required information (cookies and headers are forwarded to the origin).

As part of the integration, your Akamai consultant will ensure that every client requests result in a revalidation as, by default, each Akamai Edge server makes only one prefresh request per object.

 

What about my short TTL objects?

You can cache content that change often, such as news articles or blogs, for short TTLs and use prefresh to keep checking for updates. For example, using a 15 min TTL with a 1m prefresh keeps popular content fresh to the minute while unpopular content is cache for only 15 min.

Caching provides performance and offload benefits. The more content that it is served from Akamai, the more the origin can concentrate into processing value added requests.

 

Additional Information

Prefresh is set to 90% by default (meaning that the Edge contacts the origin after 90% of its TTL has expired) and it can be easily adjusted in Property Manager.

You can find additional use cases and detailed information under the Asynchronous Refresh section of the Edge Configuration Guide https://control.akamai.com/portal/content/akaServiceSupport/documentation/EdgeServerDocumentation.jsp

Outcomes