Difference between X-Cache and X-Cache-Remote Akamai Headers

I searched a lot, but could not find a single page on the Internet that explained the difference between the X-Cache header and the X-Cache-Remote Akamai. Each time I get two different values ​​for these headers, this indicates that they do not match. Any information about the different between them will be very useful.

+5
source share
2 answers

As you probably know, Akamai performs two levels of redirection.

  • DNS points to one of the addresses closest to the client.
  • But this is not the address of the actual server that serves the request. Rather, the request is served by one of the "extreme" servers.

There is a possible third level. Sometimes the edge server, if the content is not in the cache, instead of sending a request to the source server, redirects it to another edge server in the hope that the latter can have the content in its cache. "X-Cache" and "X-Cache-Remote" are the cache check status on these two edge servers, respectively. If the first edge server serves the request from its cache or if it is retrieved directly from the source, the "X-Cache-Remote" header is missing.

There is practically no difference between the first and second edge servers, except for one aspect. On the second edge server, when it detects the user's location, any check related to the user's location returns false. For example, if your criterion says: "Is the user country one of (" USA ")?" will return "falsely" and vice versa: "Is the user country NOT ONE (" USA ")?" will also return false. Therefore, if you have rules that use the user's location, you somehow transfer this information from the first border server to the second. Custom outbound request headers can be used for this.

None of the above from Akamai documentation. Rather, they are based on a series of experiments performed on Akamai. Akamai gives the key to this effect by issuing a warning: "Behaviors and matches made in accordance with the user's location data will be performed only by the Akamai border server that receives the client request. If the request is redirected to another Akamai server, the matches and behavior will be ignored If you do not know how this will affect your property, contact your Akamai technical representative.

+5
source

There is a separate page that explains all the different x-akamai-* (if you are part of the Akamai customer community) that you can use with Akamai.

The possible values ​​for these 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 processed Edge Server object processed the originally processed Edge server. The x-akamai-cache-remote header reports how the Parent Tier object was processed.

In many cases, your configuration may have something called "Tiered Distribution" (or "Cache Hierarchy") that uses a multi-level caching system. There's a good video created by Akamai staff that talks about tiered distribution and other caching methods available to you through the Akamai platform. There's also a bit more about this multi-level caching system on Akamai's developer site .

+1
source

All Articles