search by tags

for the user

adventures into the land of the command line

debugging akamai

A couple of really nice blog posts on it here and here.

Also here’s my crappy explanation:

Using the pragma headers

Production example:

$ curl -H "Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no" -IXGET https://something.cool.io/abc/master.m3u8

Staging example:

$ curl -H "Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no" -IXGET -H "Host: something.cool.io" https://something.cool.io.edgekey-staging.net/abc/master.m3u8

Sample full response:

HTTP/1.1 200 OK
Server: nginx
Content-Length: 211
Accept-Ranges: bytes
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Akamai-SSL-Client-Sid: kXlitBcGW...ZFv32To5A==
Cache-Control: no-cache
Date: Thu, 20 Jul 2017 08:39:43 GMT
X-Cache: TCP_REFRESH_MISS from a23-50-59-5.deploy.akamaitechnologies.com (AkamaiGHost/9.0.2-20263348) (S)
X-Cache-Key: S/=/16382/491510/5s/something.else.io/abc/chunklist_w1827795352.m3u8
X-True-Cache-Key: /=/something.else.io/abc/chunklist_w1827795352.m3u8
X-Akamai-Session-Info: name=AKA_PM_BASEDIR; value=
X-Akamai-Session-Info: name=AKA_PM_CACHEABLE_OBJECT; value=true
X-Akamai-Session-Info: name=AKA_PM_FWD_URL; value=/abc/chunklist_w1827795352.m3u8
X-Akamai-Session-Info: name=AKA_PM_HLS_SEGMENT_ENCRYPTION_ENABLED; value=0
X-Akamai-Session-Info: name=AKA_PM_NETSTORAGE_ROOT; value=
X-Akamai-Session-Info: name=AKA_PM_PREDICTIVE_CONTENT_DELIVERY_ENABLED; value=0
X-Akamai-Session-Info: name=AKA_PM_PREDICTIVE_CONTENT_DELIVERY_ENTITLED; value=0
X-Akamai-Session-Info: name=AKA_PM_RESOURCE_OPTIMIZER_ENABLED; value=false
X-Akamai-Session-Info: name=AKA_PM_SR_ENABLED; value=false
X-Akamai-Session-Info: name=AKA_PM_SSL_EDGE_ALLOWED; value=true
X-Akamai-Session-Info: name=AKA_PM_TD_ENABLED; value=true
X-Akamai-Session-Info: name=AKA_PM_TD_MAP_PREFIX; value=ch
X-Akamai-Session-Info: name=AKA_PM_USECASE_CATALOG_SIZE; value=medium
X-Akamai-Session-Info: name=AKA_PM_USECASE_CLIENT_LOCATION; value=europe
X-Akamai-Session-Info: name=AKA_PM_USECASE_CONTENT_TYPE; value=hd
X-Akamai-Session-Info: name=AKA_PM_USECASE_CPCODE; value=491510
X-Akamai-Session-Info: name=AKA_PM_USECASE_DASH; value=True
X-Akamai-Session-Info: name=AKA_PM_USECASE_HDS; value=True
X-Akamai-Session-Info: name=AKA_PM_USECASE_HLS; value=True
X-Akamai-Session-Info: name=AKA_PM_USECASE_ORIGIN_LOCATION; value=europe
X-Akamai-Session-Info: name=AKA_PM_USECASE_ORIGIN_TYPE; value=customer
X-Akamai-Session-Info: name=AKA_PM_USECASE_OTHER; value=False
X-Akamai-Session-Info: name=AKA_PM_USECASE_POPULARITY; value=unknown
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_DURATION_DASH; value=6
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_DURATION_HDS; value=6
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_DURATION_HLS; value=10
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_DURATION_SMOOTH; value=2
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_SIZE_DASH; value=unknown
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_SIZE_HDS; value=unknown
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_SIZE_HLS; value=unknown
X-Akamai-Session-Info: name=AKA_PM_USECASE_SEGMENT_SIZE_SMOOTH; value=unknown
X-Akamai-Session-Info: name=AKA_PM_USECASE_SMOOTH; value=True
X-Akamai-Session-Info: name=AMD_IS_LIVE; value=1
X-Akamai-Session-Info: name=AMD_MANIFEST; value=1
X-Akamai-Session-Info: name=AMD_OV_MANIFEST_FILES; value=*.f4m *.mpd *.m3u8 *.m3u *.m3ub *.ism *.ismc
X-Akamai-Session-Info: name=IP1; value=23
X-Akamai-Session-Info: name=IP2; value=45
X-Akamai-Session-Info: name=IP3; value=247
X-Akamai-Session-Info: name=IP4; value=23
X-Akamai-Session-Info: name=MAE_QUIC_ENABLED; value=false
X-Akamai-Session-Info: name=MEDIASEC_INTERNAL_TOKEN_SALT; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_CHALLENGE_KEY; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_IDENT_KEY; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_IDENT_SALT; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_KDF_IM; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_KDF_SEED; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_RESPONSE_KEY_B64; value=censored
X-Akamai-Session-Info: name=MEDIASEC_PV_RESPONSE_KEY_HEX; value=censored
X-Akamai-Session-Info: name=MEDIASEC_SHORT_TOKEN_SALT; value=censored
X-Akamai-Session-Info: name=MEDIASEC_SM_STATIC_KEY; value=censored
X-Akamai-Session-Info: name=MEDIASEC_SM_STATIC_SALT; value=censored
X-Akamai-Session-Info: name=MEDIASEC_SM_STATIC_SID; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_ENABLED; value=0
X-Akamai-Session-Info: name=MEDIASEC_TA_GEN_ACL; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_GEN_DIGEST; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_GEN_EXP; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_GEN_SALT; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_HLS_ACL; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_PRIMARY; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_SALT; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_SHORT_ACL; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_SHORT_DIGEST; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_SHORT_EXP; value=censored
X-Akamai-Session-Info: name=MEDIASEC_TA_TRANSITION; value=censored
X-Akamai-Session-Info: name=OVERRIDE_HTTPS_IE_CACHE_BUST; value=all
X-Akamai-Session-Info: name=STRICT_BASELINE_V1ARL_CHECKS; value=>
X-Akamai-Session-Info: name=TCP_FAST_ESSL_E2U; value=1
X-Akamai-Session-Info: name=USS_IS_LIVE; value=1
X-Akamai-Session-Info: name=Y_QUIC_ALLOW; value=1
X-Akamai-Session-Info: name=Y_QUIC_ALTSVC_ENABLE; value=0
X-Akamai-Session-Info: name=Y_QUIC_ALTSVC_PARAMS; value=ma=3600
X-Akamai-Session-Info: name=Y_QUIC_BEACON_DO_NOT_SAMPLE; value=0
X-Akamai-Session-Info: name=Y_QUIC_BEACON_REASON; value=0
X-Akamai-Session-Info: name=Y_QUIC_BEACON_SAMPLED; value=0
X-Akamai-Session-Info: name=Y_QUIC_BEACON_UA; value=curl%2f7.49.1; full_location_id=User-Agent
X-Akamai-Session-Info: name=Y_QUIC_DATA_TEST_SUITE; value=standard
X-Akamai-Session-Info: name=Y_QUIC_INTERNAL_ENABLE; value=0
X-Serial: 16382
X-Akamai-SSL-Client-Sid: bKnHbBH8b0...xVG9PfPDA==
Connection: keep-alive
X-Cache-Remote: TCP_REFRESH_MISS from a23-50-56-30.deploy.akamaitechnologies.com (AkamaiGHost/9.0.0-20100727) (S)
Content-Type: application/x-mpegURL
Access-Control-Max-Age: 86400
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Server,range,hdntl,hdnts
Access-Control-Allow-Headers: origin,range,hdntl,hdnts
Access-Control-Allow-Methods: GET,POST,OPTIONS
Access-Control-Allow-Origin: *
X-Akamai-Staging: ESSL
X-Check-Cacheable: YES

Important fields to looks out for:

X-Check-Cacheable

Whether the object is cacheable by akamai

X-Cache

TCP_HIT: the object was served from disk cache.
TCP_MISS: the object was not in cache, akamai fetched the object from the origin.
TCP_REFRESH_HIT: The object was stale in cache and successfully un-staled the object on an If-Modified-Since request.
TCP_REFRESH_MISS: The object was stale in cache and a refresh obtained a new object from the origin in response to our IF-Modified-Since request.
TCP_REFRESH_FAIL_HIT: The object was stale in cache and we failed on refresh (couldn’t reach origin) so we served the stale object.
TCP_IMS_HIT: IF-Modified-Since request from client and object was fresh in cache and served.
TCP_NEGATIVE_HIT: Object previously returned a “not found” (or any other negatively cacheable response) and that cached response was a hit for this new request.
TCP_MEM_HIT: Object was on disk and in the cache's memory. Akamai served it without having to request from the cache's disk.
TCP_DENIED: Denied access to the client for whatever reason.
TCP_COOKIE_DENY: Denied access on cookie authentication (if centralized or decentralized authorization feature is being used in configuration).

X-Cache-Key

S/=/16382/491510/5s/something.else.io/abc/chunklist_w1827795352.m3u8

491510 is a CP code, 5s is cache TTL on the Akamai side.