Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization uses a global external Application Load Balancer with Cloud CDN enabled for two origins:
static-assets): Serves versioned assets (using ?v=) with default object metadata, plus a /manifest.json object configured with Cache-Control: no-store. You must cache the versioned assets in Cloud CDN for 7 days (604800 seconds), limit client browser max-age to 1 hour (3600 seconds), and never cache /manifest.json.api-service): Returns cacheable JSON responses (Cache-Control: public, max-age=120) with a Vary: Accept-Language header, user-specific responses with Cache-Control: private, and uncached 404 and 301 responses. You must cache 404 responses for 60 seconds and 301 redirects for 600 seconds.Which configuration meets all caching requirements?
static-assets objects, set static-assets to FORCE_CACHE_ALL with defaultTtl = 604800 and clientTtl = 3600, and add v to queryStringWhitelist. Set api-service to USE_ORIGIN_HEADERS, rely on the origin Vary: Accept-Language header without adding it to includeHttpHeaders, enable negativeCaching, and set negativeCachingPolicy to 404=60,301=600.This configuration attempts to override Cloud Storage's default 1-hour Cache-Control header using FORCE_CACHE_ALL on the bucket and relies on USE_ORIGIN_HEADERS plus the origin's Vary: Accept-Language response header on the Cloud Run backend service without customizing the cache key.
/manifest.json despite no-store: The FORCE_CACHE_ALL cache mode unconditionally caches all successful responses regardless of origin Cache-Control directives. As a result, Cloud CDN ignores Cache-Control: no-store on /manifest.json and caches it for 7 days.api-service responses with Vary: Accept-Language: Cloud CDN blocks caching for any response containing a Vary header unless its value is one of a small set of standard allowed headers (such as Accept, Accept-Encoding, or Origin) or is explicitly configured in the backend's cache key settings. Because Accept-Language is not in the default allowlist and is omitted from includeHttpHeaders, Cloud CDN treats every api-service response with Vary: Accept-Language as uncacheable.FORCE_CACHE_ALL: Should only be used when every object served by that backend is intended for public caching, as it bypasses private and no-store protections.Vary header enforcement: Custom Vary headers require matching entries in cacheKeyPolicy.includeHttpHeaders to prevent cache poisoning and enable caching.USE_ORIGIN_HEADERS: Origin directives solely govern 2xx TTLs, though negativeCaching still applies to unheadered error and redirect codes.static-assets did not contain no-store objects like /manifest.json (or used CACHE_ALL_STATIC with object metadata instead), and Accept-Language were explicitly added to includeHttpHeaders on api-service.Cache-Control: public, max-age=604800 metadata on the versioned static-assets objects, set static-assets to CACHE_ALL_STATIC with clientTtl = 3600 (leaving maxTtl at default), and add v to queryStringWhitelist. Set api-service to CACHE_ALL_STATIC, add Accept-Language to includeHttpHeaders, enable negativeCaching, and set negativeCachingPolicy to 404=60.This configuration updates object-level Cache-Control metadata on the Cloud Storage objects and enables negative caching on the Cloud Run backend service, but it leaves maxTtl at its default value on the bucket and omits 301 from the negativeCachingPolicy list.
static-assets is capped at 1 day instead of 7 days: In CACHE_ALL_STATIC mode, Cloud CDN enforces a default maxTtl of 86400 seconds (24 hours). Even though the Cloud Storage objects specify max-age=604800, Cloud CDN caps the internal cache TTL at 86400 seconds unless maxTtl is explicitly increased.301 redirects are not cached on api-service: When you enable negativeCaching without a negativeCachingPolicy, Cloud CDN uses built-in defaults (such as 10 minutes for 301 and 120 seconds for 404). However, as soon as you define a custom negativeCachingPolicy, Cloud CDN disables all default negative caching rules and only caches the status codes explicitly listed in the policy. Specifying only 404=60 stops 301 redirects from being cached.defaultTtl=3600s, clientTtl=3600s, and maxTtl=86400s.negativeCachingPolicy: Any custom policy completely replaces the default status code table; unlisted codes are excluded from negative caching.clientTtl clamps what browsers receive, whereas maxTtl clamps how long Cloud CDN retains the object.maxTtl on static-assets were explicitly set to 604800 seconds, and 301=600 were included alongside 404=60 in api-service's negativeCachingPolicy.Cache-Control: public, max-age=604800 metadata on the versioned static-assets objects, set static-assets to CACHE_ALL_STATIC with maxTtl = 604800 and clientTtl = 3600, and add v to queryStringWhitelist. Set api-service to CACHE_ALL_STATIC, add Accept-Language to includeHttpHeaders, enable negativeCaching, and set negativeCachingPolicy to 404=60,301=600.This configuration aligns Cloud CDN's cache modes, TTL overrides, cache key policies, and negative caching rules with the exact HTTP header behavior of both Cloud Storage backend buckets and Cloud Run backend services.
max-age on static-assets: Because Cloud Storage always emits a Cache-Control header (public, max-age=3600 by default), updating the versioned objects' metadata to Cache-Control: public, max-age=604800 establishes the 7-day freshness directive. Raising maxTtl from its 86400-second (1-day) default to 604800 seconds prevents Cloud CDN from capping the 7-day TTL, while setting clientTtl to 3600 clamps the max-age returned to client browsers to 1 hour./manifest.json from caching: Using CACHE_ALL_STATIC respects the Cache-Control: no-store metadata on /manifest.json, ensuring it is never stored in Cloud CDN or browser caches.generation). Adding v to queryStringWhitelist ensures ?v= parameters differentiate cached versions.Vary: Accept-Language while protecting private responses on api-service: CACHE_ALL_STATIC caches application/json responses that include explicit Cache-Control: public, max-age=120 headers while refusing to cache Cache-Control: private responses. Adding Accept-Language to includeHttpHeaders incorporates the language header into the cache key and makes Vary: Accept-Language cacheable.404 and 301: When a negativeCachingPolicy is defined, Cloud CDN disables all default negative caching TTLs; explicitly specifying both 404=60 and 301=600 ensures both codes are cached for the required durations.clientTtl clamping: Reduces the downstream max-age sent to browsers without shortening Cloud CDN's internal cache retention.queryStringWhitelist on buckets and includeHttpHeaders on backend services prevents cache fragmentation while keeping variants distinct.It satisfies every freshness, security, and cache key constraint using native backend policies without risking accidental caching of no-store or private content.
static-assets objects, set static-assets to CACHE_ALL_STATIC with defaultTtl = 604800, maxTtl = 604800, clientTtl = 3600, and add v to queryStringWhitelist. Set api-service to CACHE_ALL_STATIC, add Accept-Language to includeHttpHeaders, enable negativeCaching, and set negativeCachingPolicy to 404=60,301=600.This configuration correctly sets up the api-service backend service and adds the v query parameter to the static-assets cache key, but it relies on defaultTtl to extend the caching duration of Cloud Storage objects that still use default object metadata.
Cache-Control metadata, Cloud Storage automatically attaches a Cache-Control: public, max-age=3600 response header when serving the object.CACHE_ALL_STATIC mode: In CACHE_ALL_STATIC mode, Cloud CDN only applies defaultTtl when the origin response lacks explicit freshness directives (max-age, s-maxage, or Expires). Because Cloud Storage always supplies max-age=3600, Cloud CDN honors the origin header and ignores defaultTtl=604800, caching the assets for only 1 hour instead of 7 days.public, max-age=3600.defaultTtl: Acts strictly as a fallback for origins (such as Compute Engine web servers) that omit Cache-Control headers on static MIME types, or as a forced override when using FORCE_CACHE_ALL.maxTtl: Caps higher origin TTLs downward; it never extends a lower origin TTL upward.Cache-Control metadata on the versioned Cloud Storage objects to public, max-age=604800, allowing CACHE_ALL_STATIC with maxTtl=604800 and clientTtl=3600 to honor the 7-day CDN TTL while clamping browser caching to 1 hour.Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated