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.
At Akamai, caching refers to objects retrieved from your origin server and stored at any number of edge servers. Edge servers can quickly deliver the cached objects to your API consumers. Caching decreases the load on your origin server and reduces latency in serving objects to the end client.
The Akamai servers cannot cache different versions of the content based on the values of the Vary header. As a result, objects received with a Vary header that contains any value (s) other than "Accept-Encoding" will not be cached.
This header simply indicates whether this particular URL can be cached on Akamai or not. Request ID provides a unique request identifier on Akamai network. Value of this header can be used to trace a request on Akamai network by support representative. X-Cache: TCP_MISS from a165-254-246-9.deploy.akamaitechnologies.com
X-Cache-Remote: TCP_HIT from a23-67-252-148.deploy.akamaitechnologies.com Values of X-Cache headers mention which Akamai servers participated in serving your request.
This is the list of Akamai Pragma headers you can use when creating a request in the Request Content (CURL) tool and Advanced URL Health Check problem scenario. Returns information about how the edge server response was served. Returns information about how the parent server response was served.
As you probably know, Akamai does two levels of redirections.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With