
Answer-first summary for fast verification
Answer: Deploy a Lambda@Edge function to standardize parameters by sorting them alphabetically and converting them to lowercase, triggered by the CloudFront viewer request event.
The correct answer is A. Amazon CloudFront's caching mechanism considers the order and case of query string parameters. Inconsistent ordering and mixed-case letters can lead to a lower cache hit ratio as CloudFront may treat them as different requests. By deploying a Lambda@Edge function that sorts these parameters alphabetically and converts them to lowercase, you can ensure uniformity in the requests, thereby increasing the cache hit ratio and improving the application's performance. Options B, C, and D do not address the underlying issue of query string normalization, and thus, are not effective solutions.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company's web application, which utilizes Amazon CloudFront for enhanced global scalability and performance, is experiencing a decline in user-reported speed. The operations team has noted a steady decrease in the CloudFront cache hit ratio. Analysis of cache metrics reveals that query strings in URLs are inconsistently ordered and vary in case (mixed-case versus lowercase). What measures should the solutions architect implement to promptly improve the cache hit ratio?
A
Deploy a Lambda@Edge function to standardize parameters by sorting them alphabetically and converting them to lowercase, triggered by the CloudFront viewer request event.
B
Modify the CloudFront distribution settings to stop caching based on query string parameters.
C
Set up a reverse proxy behind the load balancer to normalize the URLs by converting query strings to lowercase before they are processed by the application.
D
Adjust the CloudFront distribution configuration to handle query string parameters without regard to case sensitivity.
No comments yet.