Question

Difficulty: EasyConfigure and Manage Azure CDN Endpoints and Caching Rules

You are configuring an Azure CDN endpoint to serve static images for an online catalog. The images are updated infrequently, but users append query parameters such as version numbers (e.g., image.png?v=1.2) to the URLs. You want to ensure that the CDN serves the cached image regardless of any query strings provided in the request to maximize the cache hit ratio and reduce traffic to the origin.

Which query string caching behavior should you configure for the CDN endpoint?

  1. Ignore query stringsAnswer
  2. B
    Bypass caching
  3. C
    Cache every unique URL
  4. D
    Redirect query strings

Answer

Ignore query strings
The setting that ignores query strings is correct. Under this behavior, the first request is cached, and all subsequent requests with different query strings (such as version numbers) are served from the cache, maximizing the cache hit ratio and minimizing origin requests.

Step-by-Step Solution

1
Analyze the business requirement.
The goal is to serve cached images from the CDN regardless of any query parameters appended to the URL (such as version numbers) in order to optimize the cache hit ratio.
Since the static images are the same regardless of query parameters, we want the CDN to treat all variations of the URL as the same cached asset.
2
Evaluate Azure CDN query string caching settings.
The three caching settings are: 'Ignore query strings' (caches the first request and ignores subsequent query parameters), 'Bypass caching' (sends all query-string requests to the origin without caching), and 'Cache every unique URL' (caches each query string variation separately).
We must match the target behavior to one of the supported caching configurations.
3
Select the behavior that ignores query string changes.
The 'Ignore query strings' behavior is selected because it serves the same cached asset for any query string parameters, fulfilling the requirement.
This configuration directly aligns with the goal of serving the cached asset ignoring parameters.

Key Concept

Azure CDN Query String Caching Behavior
Estimated Time:45s
Rate this question