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 serves semi-dynamic product catalog assets (JSON files and images up to 500 KB) through an external Application Load Balancer with Cloud CDN enabled, backed by a Managed Instance Group (MIG) of web servers. Because updates occur unpredictably, you want to avoid manual cache invalidations and minimize origin egress bandwidth while preventing latency spikes upon cache expiration.
Your architecture must satisfy the following requirements:
Which configuration should you implement?
FORCE_CACHE_ALL with --default-ttl=600 and --client-ttl=60 on the backend service. Configure the MIG instances using the same VM image to return Cache-Control: stale-while-revalidate=3600, stale-if-error=3600 along with ETag and Last-Modified headers, and respond with 304 Not Modified to conditional requests.This configuration uses the FORCE_CACHE_ALL backend cache mode to override origin caching rules with load balancer TTL flags (--default-ttl and --client-ttl), while relying on origin Cache-Control directives (stale-while-revalidate and stale-if-error) to govern stale behavior.
stale-while-revalidate: Cloud CDN explicitly does not honor the Cache-Control: stale-while-revalidate directive when the backend cache mode is set to FORCE_CACHE_ALL. Because --serve-while-stale is not configured on the backend policy, Cloud CDN falls back to its default 86,400-second (24-hour) stale window rather than the required 1-hour (3,600-second) limit.stale-if-error directive: Cloud CDN does not support stale-if-error and ignores it completely in both requests and responses.FORCE_CACHE_ALL, --client-ttl acts only as an upper cap on what is sent to downstream clients and cannot reliably replace explicit Cache-Control: max-age=60 separation when edge caching relies on --default-ttl=600.FORCE_CACHE_ALL overrides origin directives: It unconditionally caches successful origin responses—even responses with private, no-store, or no-cache—which creates a security risk of caching unintended or dynamic responses.--serve-while-stale backend setting, Cloud CDN defaults to serving stale objects for up to 1 day.Cache-Control stale directives while FORCE_CACHE_ALL is active produces a silent configuration mismatch.FORCE_CACHE_ALL (paired with explicit --serve-while-stale and --default-ttl flags) is appropriate for public static repositories or private Cloud Storage buckets where the origin does not emit Cache-Control headers or where private bucket access requires unconditional edge caching.
USE_ORIGIN_HEADERS with --serve-while-stale=3600 on the backend service. Configure the MIG instances to return Cache-Control: public, max-age=60 and CDN-Cache-Control: public, max-age=600, stale-while-revalidate=3600, and disable ETag and Last-Modified headers on the web servers to prevent validator mismatches across instances.This configuration properly separates edge and browser TTLs using CDN-Cache-Control and Cache-Control, and sets a 1-hour stale-serving window with --serve-while-stale=3600. However, it deliberately strips ETag and Last-Modified validators from origin responses to avoid cross-instance inconsistencies in the MIG.
If-None-Match and If-Modified-Since) if the previously cached response contains an ETag or Last-Modified header. Without these validators, Cloud CDN ignores the expired cache entry during revalidation and forwards an unconditional GET request to the origin.304 Not Modified response and must transmit the entire 200 OK response body on every revalidation cycle.Last-Modified or ETag header and an incoming client GET request that lacks its own If-Modified-Since or If-None-Match headers.ETag values across different MIG instances do cause Cloud CDN to treat responses as cache misses (or abort byte-range assembly), the correct remediation is deploying instances from a uniform VM image or configuring consistent hash-based ETags—not disabling validators altogether.Disabling ETag headers might be used as a temporary workaround for small, immutable assets with very long TTLs when legacy backend servers generate non-deterministic file timestamps and cannot be standardized onto a single VM image, though Last-Modified or versioned URLs remain preferable.
USE_ORIGIN_HEADERS. Configure the MIG instances using the same VM image to return Cache-Control: public, max-age=60, s-maxage=600, must-revalidate, stale-while-revalidate=3600 along with ETag and Last-Modified headers, and respond with 304 Not Modified to conditional requests.This configuration attempts to use standard HTTP shared-cache directives—specifically s-maxage and must-revalidate—within the Cache-Control header to separate edge cache lifetimes from browser lifetimes while enforcing strict revalidation. Using a shared VM image ensures consistent ETag and Last-Modified validators across the MIG.
s-maxage directive or the must-revalidate directive are never served stale. Even though stale-while-revalidate=3600 is present in the same header, s-maxage and must-revalidate prohibit Cloud CDN from returning expired content.s-maxage handling: While s-maxage overrides max-age for shared caches, Cloud CDN explicitly disables stale-while-revalidate behavior whenever s-maxage is present.must-revalidate semantics: Both must-revalidate and proxy-revalidate force immediate synchronous origin checks upon expiration.ETag values for 304 Not Modified responses, but it cannot overcome the stale-serving restriction.This configuration (without stale-while-revalidate) is appropriate when strict consistency is mandatory—such as financial ledgers or access-control metadata—where serving expired data even for a second is unacceptable and clients must always wait for synchronous origin validation.
USE_ORIGIN_HEADERS with --serve-while-stale=3600 on the backend service. Configure the MIG instances using the same VM image to return Cache-Control: public, max-age=60, CDN-Cache-Control: public, max-age=600, stale-while-revalidate=3600, and consistent ETag and Last-Modified headers, returning 304 Not Modified for unchanged conditional requests.This architecture combines targeted CDN cache headers, asynchronous stale-while-revalidate policies, and origin conditional validation to balance content freshness with edge offload. By separating CDN-Cache-Control from Cache-Control and ensuring deterministic validators across all backend VMs, Cloud CDN handles expiration gracefully without manual cache purges.
CDN-Cache-Control exclusively when present and ignores the standard Cache-Control header, caching assets at the edge for 600 seconds (max-age=600). Meanwhile, CDN-Cache-Control is forwarded downstream where browsers ignore it and honor Cache-Control: public, max-age=60, revalidating with Cloud CDN every 60 seconds.s-maxage or must-revalidate, using max-age inside CDN-Cache-Control allows stale serving. Both stale-while-revalidate=3600 and --serve-while-stale=3600 permit Cloud CDN to immediately serve expired content for up to 1 hour while asynchronously sending a background validation request (tagged with User-Agent: Cloud-CDN-Google) to the origin.ETag and Last-Modified values across every backend instance. Cloud CDN injects If-None-Match and If-Modified-Since headers into revalidation GET requests, allowing the origin to return a lightweight 304 Not Modified response containing only headers rather than the full 500 KB body.ETag headers across autoscaled MIG instances.200 OK payload transfers with header-only 304 Not Modified validations.Compared to s-maxage (which disables stale serving), FORCE_CACHE_ALL (which ignores origin stale-while-revalidate headers), or omitting validators (which forces full payload downloads), CDN-Cache-Control with USE_ORIGIN_HEADERS, --serve-while-stale=3600, and uniform ETag/Last-Modified generation satisfies every freshness and efficiency constraint natively.
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