Interview Prep/Networking/Load Balancers, Proxies & CDNs

How does CDN caching work and what is the cache key?

IntermediateConceptLoad Balancers, Proxies & CDNs
Answer

The edge looks up a cache entry using the cache key, by default scheme, host, path and query string, plus any headers or cookies you include. On a miss it fetches from the origin and stores according to Cache-Control and CDN rules.

Including too much (all cookies, unneeded query params) fragments the cache and destroys hit ratio. Keep the key minimal and normalize query strings.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancers, Proxies & CDNs