I searched a lot but couldn't find a single page on the internet which explained the difference between X-Cache and X-Cache-Remote Akamai header. Every time I receive two different values for these headers which indicates that they are not the same. Any information regarding the different between the two will be of great help.
As you probably know, Akamai does two levels of redirections.
- The DNS points to one of the addresses closest to the client.
- But it is not the address of the actual server that services the request. Rather the request gets serviced by one of the "edge" servers.
There is a possible third level. Sometimes the edge server, if the content is not in its cache, instead of sending the request to the origin server it redirects to another edge server in the hope that the latter may have the content in its cache. "X-Cache" and "X-Cache-Remote" are the status of cache check on these two edge servers respectively. If the first edge server serves the request from its cache or if it fetches from the origin directly, "X-Cache-Remote" header is absent.
There is practically no difference between the first and the second edge servers except in one aspect. In the second edge server, detection of user location, any check related to user location returns "false". For example if your criterion says "Is the user country one of ("US")?" would return "false" and the opposite "Is the user country NOT one of ("US")?" would also return false. So if you have rules that use user location, you have somehow pass that information from the first edge server to the second. Custom outgoing request headers can be used for this.
None of the above is from the Akamai documentation. Rather they are based on a series of experiments performed on Akamai. Akamai does give a clue to this effect by emitting a warning: "The behaviors and matches enclosed within a User Location Data match will only be executed by the Akamai edge server that receives the client request. If the request is forwarded to another Akamai server, the matches and behaviors enclosed will be ignored. If you are unsure about how this will affect your property please contact your Akamai Technical representative."
There is a single page that explains all of the various x-akamai-*
headers (if you're logged in to the Akamai Customer Community) that you can use with Akamai.
The possible values of those two specific headers (x-akamai-cache
and x-akamai-cache-remote
) are available in a separate Customer Community document.
In short, the x-akamai-cache
header tells you how the initially responding Edge server handled the object. The x-akamai-cache-remote
header tells you how the Parent Tier handled the object.
In many circumstances, your configuration may have something called "Tiered Distribution" (or "Cache Hierarchy") enabled which uses a multi-layered caching system. There's a good video created by Akamai employees that talks about Tiered Distribution and other caching behaviors available to you through the Akamai platform. There's also a little more on this multi-tiered caching system on Akamai's Developer site.
© 2022 - 2024 — McMap. All rights reserved.