CDN Content Distribution & Caching 2 — Questions and Answers
Question 1: Which cache eviction policy removes the item that has not been accessed for the longest period of time?
- First In, First Out (FIFO)
- Least Recently Used (LRU) (Correct answer)
- Least Frequently Used (LFU)
- Random Replacement (RR)
Correct answer: Least Recently Used (LRU)
LRU evicts the item whose last access time is the oldest, making it ideal for workloads with temporal locality.
Question 2: A CDN edge node receives a request for a resource with 'Cache-Control: no-store'. What must the CDN do?
- Cache the resource but never serve it from cache
- Cache the resource for 1 second only
- Not store any part of the request or response (Correct answer)
- Store the resource in memory only, not on disk
Correct answer: Not store any part of the request or response
'no-store' is the strictest directive, instructing the CDN to never persist any part of the transaction.
Question 3: What is 'cache warming' in the context of CDN operations?
- Increasing edge server temperature thresholds
- Pre-populating edge caches with content before user requests arrive (Correct answer)
- Gradually increasing TTL values over time
- Enabling keep-alive connections on cache servers
Correct answer: Pre-populating edge caches with content before user requests arrive
Cache warming proactively pushes content to edge nodes to avoid cold-start latency spikes when traffic begins.
Question 4: Which HTTP header does a CDN use to indicate that a cached response is stale but still being served while a background revalidation occurs?
- Age: stale
- Warning: 110 (Correct answer)
- X-Cache-Status: STALE
- Cache-Control: stale-while-revalidate
Correct answer: Warning: 110
HTTP Warning code 110 ('Response is Stale') signals that the CDN is serving a stale cached response.
Question 5: A media company serves video segments of varying popularity. Which caching strategy best handles a long-tail content distribution?
- Cache only the top 10% most popular segments
- Use tiered caching with a large regional cache behind edge nodes (Correct answer)
- Set uniform TTLs of 24 hours for all segments
- Disable caching for segments with fewer than 100 views
Correct answer: Use tiered caching with a large regional cache behind edge nodes
Tiered caching allows long-tail content to be fetched once to a regional parent cache and then served to multiple edge nodes.
Question 6: What does the 's-maxage' directive in a Cache-Control header specifically control?
- Maximum age for browser caches only
- Maximum age for shared caches such as CDN edge nodes (Correct answer)
- The staleness window for service workers
- How long stale content can be served while revalidating
Correct answer: Maximum age for shared caches such as CDN edge nodes
's-maxage' overrides 'max-age' specifically for shared/proxy caches, allowing different TTLs for CDN vs. browser.
Question 7: When a CDN edge node returns an HTTP 304 Not Modified response to a browser, what has occurred?
- The CDN served the full content from its cache
- The CDN confirmed the browser's cached copy is still valid (Correct answer)
- The CDN fetched fresh content from origin
- The CDN purged the requested resource
Correct answer: The CDN confirmed the browser's cached copy is still valid
A 304 tells the browser its cached version matches the current version, so no body is transmitted, saving bandwidth.
Which cache eviction policy removes the item that has not been accessed for the longest period of time?