A company logo image is served across multiple company-hosted domains via Cloud CDN. You want to improve the cache hit ratio for that image. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure custom cache keys on the backend service and disable Host and Protocol in the cache key..
Why this is the answer
To improve the cache hit ratio for an image served across multiple domains via Cloud CDN, configuring custom cache keys and disabling Host and Protocol is the correct approach. By default, Cloud CDN's cache key includes the Host and Protocol. If these are included, requests for the same image from different domains (e.g., www.domainA.com/logo.png and www.domainB.com/logo.png) will be treated as distinct cache entries, even if the underlying image is identical. Disabling Host and Protocol ensures that the CDN treats requests for the same image path, regardless of the originating domain or protocol, as a single cacheable object, thereby increasing the likelihood of a cache hit. Setting the image’s default TTL to 0 would prevent caching entirely, defeating the purpose of CDN. Serving domain-specific versioned URLs would create more unique cache entries, decreasing the cache hit ratio. Hosting the image in a Cloud Storage backend bucket with a multi-region location improves availability and latency but doesn't directly address the cache hit ratio issue across different hostnames.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed