Accelerate Delivery & Offload Origin
Use these settings to enhance delivery performance and optimize how the Akamai edge interacts with your origin and end users. The caching templates manage how content is cached at the Akamai edge and within end-user browsers. Effective caching reduces origin load, saves bandwidth, and places assets closer to your users for faster delivery.
DNS Asynchronous Refresh
An origin DNS record (A record) maps your hostname to an IP address. This behavior defines how edge servers handle requests when that DNS record expires.
If you disable this setting, the edge server must resolve the DNS record before forwarding the request. If the resolution fails or takes time, the user may experience a delay or a denial of service.
Default setup
- Enabled by default. This prevents user-perceived latency, and edge servers use the expired record to forward the current request while simultaneously refreshing the DNS record in the background.
- Timeout. Best practice for Ion is 5 hours. This defines how long an expired record remains valid for subsequent requests while the refresh occurs.
- Toggling this setting off and on resets the timeout to the global default of 2 hours.
- For advanced control over origin timeouts, consider adding the optional Read Timeout and Connect Timeout behaviors.
To learn more, see DNS Asynchronous Refresh.
HTTP/3
Enabled by default with no additional settings required.
HTTP/3 reduces latency by replacing TCP with the IETF QUIC protocol. This allows for faster connection setup and more efficient stream handling.
Requirements
To support HTTP/3, make sure you use Transport Layer Security (TLS) 1.3 for client-to-edge requests.
To learn more, see HTTP/3.
HTTP/2
This setting is automatically enabled in the background and cannot be disabled.
HTTP/2 allows concurrent downloads over a single TCP connection, supports object prioritization, and uses header compression to save bandwidth.
To learn more, see HTTP/2.
Chunked Transfer Encoding
Allowed by default with no additional settings required.
This encoding type improves performance for large content requests by breaking data into chunks, preventing a single large download from "blocking" a connection.
Requirements
- You need to enable chunked transfer encoding on your origin server.
- If you use HTTP/2 or HTTP/3, don’t set this to Deny. Doing so results in a denial of service for clients requesting chunked content.
To learn more, see Chunked Transfer Encoding.
SureRoute
SureRoute identifies the fastest path between Akamai edge servers and your origin by testing multiple routes. It also provides failover paths to maintain availability.
SureRoute is designed primarily for non-cacheable content. For example, no-store. The system automatically disables SureRoute when it detects cacheable content, as serving from the edge cache is always faster than any origin route.
Default setup
- Enabled by default.
- Optimization Type. The Performance option identifies the optimal path to your origin by conducting periodic "races" triggered by end-user requests for non-cacheable content. During these races, SureRoute tests three simultaneous paths using a Test Object and designates the fastest result as the primary route to ensure rapid adaptation to changing internet conditions.
- SureRoute Test Object. Provide a path to the SureRoute Test Object on your origin server. See Sure Route for specific instructions.
- Forward HOST Header. Same as incoming HOST header uses the standard Forward Host Header you've set for your origin server.
- Cache Life for Race Results. Once the best route is determined after the race, it’s used for 30 minutes.
- Force SSL Protocol for Races. Disabled by default. If your origin only supports HTTPS traffic, set this to On to add HTTPS secure transfer when races are performed to determine the best route.
- Additional Options – Race Result Key. Defaults to race destination to store the race data using your origin hostname.
Requirements
- If your configuration serves only cacheable content, disable this feature.
- SureRoute is incompatible with Cloud Wrapper. If you use Cloud Wrapper, make sure to disable Tiered Distribution.
To learn more, see SureRoute.
Early Data (0-RTT)
Early Data (0-RTT) is a TLS 1.3 feature that allows clients resuming a session to send data during the initial handshake, eliminating one round trip to reduce Time to First Byte (TTFB).
Akamai only supports Early Data for GET requests without query parameters to mitigate security risks like replay attacks. To further optimize performance, you can use the Early Data (0-RTT): Advanced setting to extend zero-round-trip benefits to a wider range of requests beyond the default GET operations.
Requirements
Before enabling this setting, make sure you meet these prerequisites:
- Secure connection. Make sure you use a HTTPS certificate that has TLS 1.3 enabled in its deployment settings.
- Compatibility check. This behavior is incompatible with the Enforce mTLS settings behavior; you must remove mTLS to use Early Data.
- Origin support. Your origin must be able to recognize the Early-Data: 1 header and should be configured to respond with an HTTP 425 (Too Early) status code if a request cannot be processed safely via 0-RTT.
To learn more, see Early Data (0-RTT).
Caching Template
Recommended: Enable caching for maximum origin offload
"Origin offload" refers to the percentage of content served by Akamai instead of your origin.
Set the options
-
Caching option. Define how the edge server caches your content. You can choose to cache all content, no content, or few objects based on your file extension settings.
For the Cache all option, specify these additional settings:
- Cache revalidation. When an object exceeds its TTL and becomes "stale", the edge server sends a revalidation request to your origin to check for updates. Define behavior if that revalidation request fails:
- Serve stale if unable to validate. Serves the stale cached object if the origin is unreachable or returns a 5xx error. The TTL is then reset.
- Always revalidate with origin. Blocks stale content if the origin is unreachable or returns a 5xx error, returning a 504 Gateway Timeout to the user instead.
- Max-age. Set the duration the cached objects remain on the edge server. Once cached, edge servers calculate the remaining time to live (TTL). A setting of "0" requires revalidation before every request.
- Cache revalidation. When an object exceeds its TTL and becomes "stale", the edge server sends a revalidation request to your origin to check for updates. Define behavior if that revalidation request fails:
To balance "real-time" updates with high offload, use a long Max-age and leverage Akamai Fast Purge to clear updates in under 5 seconds.
Tiered distribution
Enabled by default, Tiered Distribution creates an additional caching layer by placing "parent" servers between Akamai edge servers and your origin. If a requested file isn't found on an edge server, Akamai checks this middle tier first instead of going straight to your origin.
If you’re using Enhanced TLS for your delivery, you can enable or disable the Tiered Distribution behavior. With Standard TLS certificate, you can additionally select a Tiered Distribution Map.
- Global Map. Optimized to reduce end-user latency globally.
- Local Map. Optimized to maximize offload for a specific geographic origin.
Key considerations
This feature creates Midgress traffic (edge-to-parent communication), which appears as a separate category in your traffic reports.
Validate Entity Tag header
Enabled by default, this setting instructs edge servers to compare the request's If-None-Match header with the ETag value of the cached object. If they are the same, the edge server returns a 304 Not Modified response containing only headers. If they differ, the edge server requests a new copy of the object from your origin server. This validation occurs in addition to the default validation of Last-Modified and If-Modified-Since headers.
Remove Vary header
Disabled by default, this setting removes the Vary header from origin responses to improve cache hit rates. The Vary header is often used to indicate varied content in the response even though the URL is the same. For example, content can vary based on its associated language. As the content in response may be different for the same URL, Akamai edge servers don't cache responses that include the Vary header, even if the content is cacheable by definition.
Cache key query parameter behavior
This setting determines how Akamai uses a URL's query string to identify and differentiate objects in the cache. Controlling which parameters are included in the "cache key" helps optimize your cache hit ratio and ensures users receive the correct version of a resource.
| Option | Description |
|---|---|
| Include all parameters (preserve order from request) | Selected by default, this setting uses the entire query string exactly as it appears in the request to define the cache key. |
| Include all parameters (reorder alphabetically) | Includes all parameters but reorders them alphabetically. This increases cache hits by treating ?a=1&b=2 and ?b=2&a=1 as the same object. |
| Exclude all parameters | Removes all parameters from the cache key of the query string. |
| Include only specified parameters... | Only the parameters you list are used for the cache key; all others are ignored. This is ideal for including only essential content-identifying IDs. |
| Exclude only specified parameters... | Removes specific parameters (such as marketing trackers or session IDs) from the cache key while including all other parts of the query string. |
Cache HTTP temporary redirects
By default, edge servers don’t cache HTTP 302 Found (previously Moved Temporarily) and 307 Temporary Redirect redirects returned from the origin server. Enabling this setting instructs the edge servers to cache 302 and 307 temporary redirects the same way as they would for 301 and 308 permanent redirects.
Cache HTTP Error response
This setting caches error messages from your origin, including 204, 305, 404, 405, 414, and 501–504. By serving a cached error to users instead of asking your origin for the same missing content repeatedly, you reduce unnecessary traffic and protect your infrastructure during outages.
It only functions when the primary Caching setting is also enabled.
- Supported Codes. Includes 204, 305, 404, 405, 414, and 501–504.
- Preserve Stale Objects. Allows the cache to use and serve stale objects instead of a fresh version from the origin.
Default setup
- Cache HTTP error Max-age. Set to 10 seconds by default. Specifies how long the error remains in the cache. A setting of 0 forces the edge server to check the origin for every request.
- Cache HTTP error preserve stale. Enabled by default. Specifies whether to serve users older ("stale") version of the content from the cache if available, or the new error message when your origin is struggling.
Responses larger than 64 KB (often custom 404 pages) are not cached by default. Contact your Akamai representative to increase this limit.
Prefresh cache
Enabled by default, this setting updates a cached object just before it expires. By refreshing the content asynchronously, the edge server ensures that a new version is ready for the next user, preventing them from having to wait for a response from your origin.
Set a percentage of the total prefresh TTL percentage. For example, setting this to 90% for a 10-minute TTL means the refresh starts at the 9-minute mark. This provides enough time for the origin to respond before the object actually expires.
Key considerations
- This behavior only triggers when a user makes a request within the "prefresh" window. For example, in the last 10% of the TTL.
- Set the percentage low enough to account for your origin's typical response time.
Content-specific caching
Ion includes caching defaults for specific file types.
- CSS and JavaScript. Cached for 7 days by default.
- Fonts & Images. Cached for 30 days by default.
Font extensions supported by default:eot,woff,woff2,otf,ttf.
Image extensions supported by default:jpg,jpeg,png,gif,webp,jp2,ico,svg,svgz. - Files. Cached for 7 days.
Never cache files containing Personally Identifiable Information (PII).
- HTML Pages. Defaulted to No store. Because HTML changes frequently, edge servers always check the origin.
Exceptions. Tracking parameters, such asgclidorutm_source, are ignored so that marketing links don't break caching for the rest of the page. - Other objects. Cached for 7 days by default.
Other file extensions supported by default:aif,aiff,au,avi,bin,bmp,cab,carb,cct,cdf,class,dcr,dtd,exe,flv,gcf,gff,grv,hdml,hqx,ini,mov,mp3,mp4,nc,pct,ppc,pws,swa,swf,txt,vbs,w32,wav,midi,wbmp,wml,wmlc,wmls,wmlsc,xsd,zip,pict,tif,tiff,mid,jxr,jar.
To learn more, see Caching.
Downstream Cache Template
Downstream caching defines how your content is stored on end-user devices, such as browsers, mobile apps, or corporate proxies. Managing these instructions helps you control how often a user's device must request a fresh copy from the Akamai edge server.
By default, Akamai instructs the client to cache content for whichever is shorter: the time remaining in the Akamai edge cache or the value from your origin headers. If your primary caching is set to no-store, Akamai automatically sends "cache-busting" headers to prevent any downstream storage.
Set the options
-
Cache option. Determines the primary instruction sent to the client.
- Allow caching. Selected by default, this is a standard downstream storage.
- Allow caching, require validation (no-cache). Allows the client to store the file but forces it to revalidate with Akamai before every use.
- Don't allow caching (bust). Forces the client to never store the content.
- Pass cacheability headers from origin. Forwards your origin's exact caching headers directly to the user.
- Don't send cacheablility headers; client browser defaults apply. The browser settings, not the server, decide how or for how long it may cache the response.
-
Cache lifetime. Sets how the expiration time is calculated.
- (Default) Smaller value: origin header or remaining edge TTL. Sends the lesser value of what the origin specifies and the edge cache’s remaining duration.
- Greater value: origin header or remaining edge TTL. Sends the greater value of what the origin specifies and the edge cache’s remaining duration.
- Remaining edge TTL. Sends the value of the edge cache’s remaining duration, without comparing it to the origin’s headers.
- Full edge TTL (max-age). Sends the
cache:max-agevalue applied to the object, without evaluating the cache’s duration. - Fixed value. Manually set how long cached objects remain in the cache using the Max-age field.
Setting the value to 0 equates to a no-cache header. This setting forces revalidation and sends all cache-busting headers downstream, regardless of what you configure in the Send Headers field.
- Calculate Expires from origin Cache-Control. Sends the value of the origin’s header, without evaluating the edge cache’s duration.
-
Headers to send. Specifies the HTTP headers to include in the response to the client.
- Send both Cache-Control and Expires. Selected by default, this sends both Cache-Control and Expires headers.
- Send only Cache-Control. Sends only the origin’s Cache-Control header.
- Send only Expires. Sends only the origin’s Expires header.
- Send same headers as origin. Sends the same set of Cache-Control and Expires headers received from the origin.
-
Mark as private. Adds a "private" directive to ensure content is only cached on the user's specific device, not on shared proxy servers.
-
Bust uncacheable. Enabled by default, this setting determines whether Akamai servers should actively prohibit downstream caching for uncacheable content by sending "cache-busting" headers to the client. When enabled, Akamai sends the following headers to ensure the content is not stored:
Expires:[current time],Cache-Control: max-age=0,Cache-Control: no-store,Cache-Control: no-cache, andPragma: no-cache.
Downstream Cache (HTML)
Disabled by default, it doesn't allow to cache the HTML responses.
To learn more, see Downstream Cacheability.
Updated 18 days ago
