Question-5: Cloud CDN is a content delivery network that speeds up the distribution of your web and video content by using Google's worldwide edge network to get material as near to your consumers as is physically feasible. Cloud CDN may be used to distribute both web and video content. As a consequence of this, latency, cost, and strain on your backend servers are decreased, which makes it simpler to scale up to millions of users. You have a static HTTP(S) website that is hosted on a Compute Engine instance group, and you are delivering its content using Cloud CDN. You aim to increase the cache hit ratio as much as possible. What is it that you ought to do?
A. Modify the cache keys in such a way that the protocol is no longer included inside them.
B. Reduce the amount of time that the cached items are kept.
C. Make it a point to check that the Cache-Area header of the HTTP(S) request corresponds to the region where your users are situated.
D. Make a copy of the material in a cloud storage bucket that does not undergo any changes. You should direct CloudCDN to a load balancer using that bucket.
Correct Answer
Get All 340 Questions and Answer for Google Professional Cloud Architect
: 1 Explanation: The cache key that is generated by Cloud CDN is often constructed using the whole request URL. It is essential to adjust the cache hit ratio in order to improve both speed and scalability. Utilizing unique cache keys is one way to assist in optimizing the hit ratio of your cache. A cache key is used to identify each individual cache item that is stored in a Cloud CDN cache. When a new request is received by the cache, the cache will first transform the URI of the request into a cache key, and it will then compare this key with the keys of previously cached items. The cache will return the object that is connected with that key if it finds a match for that key. However, given that Cloud CDN is already configured, static material ought to already be cached, and transferring it to Cloud Storage wouldn't affect the hit ratio in any way. You may customize cache keys such that they don't include the protocol. In the requesting URL, it states that you may omit the protocol, host, or query string at your discretion. If you omit the protocol, then both HTTP and HTTPS queries will reach the same cached page. If you do not omit the protocol. As a result, this results in a higher hit ratio. The latency would be reduced if Option-3 was used since it would point cache-region to the nearest region (not hit ratio). However, the cache-region parameter is not included in the HTTP header in any way. You have the ability to configure cache keys so that any combination of protocol, host, and query string may be included or omitted. Take, for instance, the scenario in which you have two websites hosted on separate domains but both of them utilize the same logo. Use custom cache keys in the following way to display the logo: Although the content of the website is different on each domain, you use the same business logo on each of them. Clearing the Host option will cause the cache to disregard the domain and instead store just the logo. This must be done when turning on Cloud CDN and customizing the cache keys for the backend service that stores the logo. Caching the logo is required regardless of whether it is shown over HTTP or HTTPS. When you are configuring the cache keys for the backend service that stores the logo, make sure that the option labeled Protocol is cleared. This will allow requests made through HTTP and HTTPS to be counted as matches for the cache entry that stores the logo. See the section on Using cache keys for information on how to modify cache keys.