Question

Difficulty: MediumConfigure and Manage Azure CDN Endpoints and Caching Rules

An organization hosts a web application where static assets are updated periodically. To force client browsers and CDN edge servers to retrieve the latest version of an asset, the application appends a version parameter as a query string to the asset URL, such as `/assets/logo.png?v=2`. You deploy an Azure CDN Standard from Akamai endpoint to distribute these assets. You need to ensure that when a new version of an asset is released with an updated query string parameter, the CDN retrieves the updated asset from the origin server. For subsequent requests with the same version query string, the CDN must serve the cached asset from the edge cache to minimize origin load. Which query string caching behavior should you configure on the Azure CDN endpoint?

  1. Cache every unique URLAnswer
  2. B
    Ignore query strings
  3. C
    Bypass caching
  4. D
    Set the caching behavior to override and specify a TTL of zero

Answer

Configure the query string caching behavior to 'Cache every unique URL'.
Configuring the CDN query string caching behavior to 'Cache every unique URL' ensures that each unique query string is treated as a separate asset. When a new version parameter is appended, the CDN recognizes it as a new asset, fetches the latest version from the origin, and caches it. Subsequent requests with the same version query string are then served directly from the CDN edge cache.

Step-by-Step Solution

1
Analyze the caching requirement for versioned query strings.
The CDN must fetch a new version of the asset when the query string parameter changes, but cache and serve it from the edge for identical subsequent requests.
This establishes that query strings must not be ignored (to avoid stale content) and must not bypass caching entirely (to minimize origin load).
2
Evaluate the Azure CDN query string caching settings.
'Cache every unique URL' treats each unique URL and query string combination as a unique asset with its own cache. 'Ignore query strings' serves the same cached asset regardless of the query string. 'Bypass caching' does not cache query string requests.
Mapping the requirements to standard Azure CDN features helps identify the correct configuration.
3
Select the behavior that meets all criteria.
'Cache every unique URL' is selected.
It ensures new versions (new query strings) trigger a pull from origin, while subsequent requests for the same version are cached and served from the CDN edge.

Key Concept

Azure CDN Query String Caching Behavior
Rate this question