Google Professional Cloud Network Engineer Question 502
Select 3Google Cloud PlatformYour company hosts a web application on Google Cloud, and you want to improve the global delivery performance of static assets (like images and JavaScript files) by using Cloud CDN. The application also has dynamic content that must not be cached. Which of the following steps should you take to properly configure Cloud CDN to achieve this goal?
- A
Enable Cloud CDN on the backend service or backend bucket that serves the web application.
- B
Set a Cache-Control header with 'no-cache' or 'private' for dynamic content responses.
- C
Use the 'Cache Key Policy' to include query strings and headers relevant to dynamic content.
- D
Configure a Cloud CDN origin to serve all traffic, both static and dynamic, without exception.
- E
Set URL-based routing rules to route static content to the backend bucket and dynamic content to the backend service.
Show answer and explanation
Correct answers: A, B, E
Explanation
To properly configure Cloud CDN for this scenario, you must enable it on the appropriate backend and ensure that dynamic content is excluded from caching using Cache-Control headers. Additionally, URL-based routing rules can help route static content to a backend bucket optimized for caching while routing dynamic content to a backend service. This ensures optimal performance and adherence to the application's requirements.
- A. Correct.
Correct. Enabling Cloud CDN on the backend service or bucket is a necessary step to activate the caching functionality.
- B. Correct.
Correct. Setting appropriate Cache-Control headers for dynamic content ensures it is not cached by Cloud CDN.
- C. Incorrect.
Incorrect. While the Cache Key Policy is useful for controlling cache behavior, it doesn't directly address the requirement to avoid caching dynamic content.
- D. Incorrect.
Incorrect. Configuring Cloud CDN to serve all traffic without exception would lead to caching of dynamic content, which violates the requirements.
- E. Correct.
Correct. URL-based routing rules can help separate static and dynamic content, ensuring that only static content is cached.