cta-wave / common-media-server-data

A repository to collect discussion and feedback on the Common Media Server Data proposal.
21 stars 1 forks source link

Couple of cache busting queries #15

Closed kevleyski closed 1 year ago

kevleyski commented 2 years ago

In our open source slides (https://docs.google.com/presentation/d/164PPi6yb2yFfJNBAkduXvRIrUiPzpjjjJ8IWAsqlNK4/edit?usp=sharing) we had a couple of questions that including a paragraph for clarity might be good

Question/Comment: Fairly standard CDN distribution setup is to treat each variant/combination query string as “unique” key for cache hit or miss - issue if query strings are used in CMCD_MODE_QUERY mode. By default every client returning unique CMCD metrics would get a cache miss unless CDN is configured to ignore these specific query tags.

Answer: From CDN perspective these prefixes are ignored (but this ought to be documented)

Question/comment. Similar question for when metrics are passed via headers. We see a lot of variation between CDNs in terms of how permissive or strict they are in terms of what headers are passed through, and what impacts the uniqueness of the cache key (e.g. Verizon Edgecast vs Cloudfront is a good example).

Answer: CMCD request headers don’t get past the edge. Custom headers do not affect cacheability (unless the CDN has been specifically told to do so) and so should not bust the cache - again something to this needs to be documented

wilaw commented 1 year ago

As a result of this issue, language around cache keys and query args was added to the v1 spec. Custom headers do not normally affect cacheability as was pointed out above. Thanks for the feedback.

kevleyski commented 1 year ago

Great, thanks