Domain 1: Designing highly scalable, secure, and reliable cloud-native applications
A collaborative board uses WebSockets on Cloud Run. Two users viewing the same board can connect to different instances, and each instance currently broadcasts edits only to its own connected clients. Durable edits already exist in a database. The team has an existing Memorystore Redis instance and needs immediate cross-instance broadcasts without polling the database. Which design meets that requirement?
AEnable session affinity and keep each instance broadcasting only to its own connected clients.
BPublish board edits to Redis Pub/Sub; each instance subscribes and relays edits to its connected clients.
CIncrease the Cloud Run request concurrency limit and keep all broadcasts within each instance.
DWrite each edit to the database and have clients reload the board when their WebSocket reconnects.
Show answer
Answer: B
The missing capability is distributing live updates between instances that already hold different client connections. Redis Pub/Sub provides a shared channel: each instance receives published edits and forwards them to its own clients. Google documents this pattern for Cloud Run WebSocket synchronization. The database already handles durability, so changing persistence is unnecessary. Session affinity associates a client with an instance on a best-effort basis; it does not co-locate every participant in a board or broadcast between instances. Reconnection-based reloads also fail the immediate-update requirement.
A. Affinity does not broadcast an edit to another instance that already holds a different board participant connection.
C. Higher concurrency allows more connections per instance but does not synchronize broadcasts among the instances that still exist.
D. Durable storage is already present; waiting for reconnect omits immediate delivery to currently connected users.
A developer wants Kubernetes application templates, local iteration, and access to deployed resources from VS Code. The existing VS Code workflow must support local application iteration and inspecting deployed resources through a Google Cloud extension. Which option fits?
AUse only the Artifact Registry console for image management.
BUse kubectl in an external terminal without IDE integration.
CInstall and configure Cloud Code in VS Code.
DUse a generic editor with manual YAML and no Cloud Code extension.
Show answer
Answer: C
Cloud Code brings services such as GKE into the IDE and supports the development cycle from templates through deployment monitoring. Its integration with command-line container tools also supports local iteration. Terminal commands can manage workloads but do not provide the requested integrated editor workflow. That setup lacks the requested templates and integrated Google Cloud development cycle. Image management is part of delivery but does not supply the requested Kubernetes IDE iteration tools.
A. Image management is part of delivery but does not supply the requested Kubernetes IDE iteration tools.
B. Terminal commands can manage workloads but do not provide the requested integrated editor workflow.
D. That setup lacks the requested templates and integrated Google Cloud development cycle.
Domain 3: Configuring cloud-native applications for deployment
A readiness endpoint briefly alternates between success and failure during recovery. The team wants several consecutive successful checks before the probe is considered successful again. Which probe field controls that condition?
AfailureThreshold
BsuccessThreshold
CinitialDelaySeconds
DperiodSeconds
Show answer
Answer: B
The probe successThreshold specifies the minimum consecutive successes needed after a failure before the probe is considered successful. For readiness, it can express the recovery requirement in this scenario rather than immediately treating a single transient success as recovery. This counts consecutive failed checks rather than successful checks needed for recovery. This sets how often probing occurs rather than how many successes establish recovery. This delays the first check and does not configure consecutive recovery successes.
A. This counts consecutive failed checks rather than successful checks needed for recovery.
C. This delays the first check and does not configure consecutive recovery successes.
D. This sets how often probing occurs rather than how many successes establish recovery.
Domain 4: Integrating applications with Google Cloud services
A deployment bootstrap must enable both BigQuery and Pub/Sub in its selected Google Cloud project. The existing bootstrap uses the Google Cloud CLI and must enable both APIs without manual console work. Which command pattern enables both services?
ARun gcloud services api-keys create for credentials used by both APIs.
BRun gcloud services list --available with both API names as filters.
CRun gcloud services enable with the two space-delimited service names.
DRun gcloud projects add-iam-policy-binding for each API’s service agent.
Show answer
Answer: C
The services enable command accepts space-delimited service names, so one invocation can request activation of both APIs in the selected project. Listing services reports state rather than enabling the requested APIs. Creating API credentials and granting IAM bindings address authentication or authorization, but neither is the service activation operation. The bootstrap must also run with the required permissions and verify the operation succeeds before application code depends on those services being available.
A. Creating an API key is distinct from enabling services in the project.
B. Listing availability does not enable the services.
D. An IAM policy binding does not perform the Service Usage enable operation.
Domain 1: Designing highly scalable, secure, and reliable cloud-native applications
A team has migrated consumers to a new Secret Manager version. It suspects an infrequently used job may still depend on the old version and wants a reversible retirement check before permanent removal. Which action follows the documented practice?
ADelete the whole secret so every version disappears together.
BDisable the old version before deciding to destroy it.
CMove consumers to a new alias while leaving the old version enabled indefinitely.
DDestroy the old version immediately and wait for failures.
Show answer
Answer: B
Secret Manager recommends disabling versions before destroying them or deleting the secret. Disabling makes the old value unavailable through a reversible action, allowing the team to detect lingering consumers before permanent removal. Immediate destruction or deletion removes that recovery option. Merely moving an alias while leaving the old version accessible does not expose forgotten direct references. The retirement check must deliberately withdraw the old version access while retaining a way to restore it if a dependency is found.
A. Deleting the entire secret also removes the new version and exceeds the old-version retirement scope. See https://cloud.google.com/secret-manager/docs/best-practices.
C. An enabled old version does not test whether forgotten consumers still depend on access to it. See https://cloud.google.com/secret-manager/docs/best-practices.
D. Immediate destruction removes the reversible dependency-check step recommended by the documentation. See https://cloud.google.com/secret-manager/docs/best-practices.
Domain 2: Building and testing applications · Select 2
A compiler step writes generated files needed by a later packaging step in the same Cloud Build run. The steps execute in separate containers. Which TWO storage choices can retain the files across those steps?
AWrite the files beneath the shared /workspace directory.
BWrite only into an unmounted path in the compiler container.
CMount the same named user-defined volume in both steps.
DKeep the generated files only on the invoking laptop.
Show answer
Answer: A, C
Cloud Build provides /workspace and user-defined volumes whose contents persist throughout the build. Both can transfer generated files between separate step containers when the producer and consumer use the shared location. Container-local paths are not the documented shared state visible to the later step. The remote build steps do not share the developer laptop's live filesystem. The producer must write to the location mounted for the consumer.
A. Cloud Build mounts /workspace into every step container, and its contents last for the whole build. The compiler can write there and the packaging step reads the same files.
B. Container-local paths are not the documented shared state visible to the later step.
C. A named user-defined volume mounted in both steps also persists across steps. It lets the two containers share files in a path of the team's choosing.
D. The remote build steps do not share the developer laptop's live filesystem.
Domain 3: Configuring cloud-native applications for deployment
A team is configuring an Eventarc event receiver on Cloud Run. The existing handler must separate CloudEvents metadata from the JSON payload delivered through the documented HTTP binding. Which parsing model follows the documented receiver binding?
ATreat the entire request body as only transport metadata.
BExpect ce-type and ce-id only inside the JSON payload.
CUse the payload schema to infer the source and ignore headers.
DRead event metadata from CloudEvents headers and the event data from the body.
Show answer
Answer: D
Eventarc delivers CloudEvents through HTTP requests with defined metadata headers and a payload body. The receiver should parse those layers according to the binding rather than assume the application payload duplicates every event metadata field. The binding defines these as HTTP headers rather than requiring body fields with those names. Payload inference discards the explicit CloudEvents source metadata provided by the binding. The HTTP body contains event data; metadata headers do not eliminate the payload.
A. The HTTP body contains event data; metadata headers do not eliminate the payload.
B. The binding defines these as HTTP headers rather than requiring body fields with those names.
C. Payload inference discards the explicit CloudEvents source metadata provided by the binding.
Domain 4: Integrating applications with Google Cloud services
A Pub/Sub subscriber repeatedly fails on malformed messages that require manual inspection. The team wants those messages routed to a separate topic after several unsuccessful delivery attempts. Which configuration should it apply?
AConfigure a dead-letter policy on the affected subscription.
BConfigure exponential retry backoff on the affected subscription.
CConfigure a filter on the inspection subscription for delivery-attempt attributes.
DIncrease message retention on the affected subscription.
Show answer
Answer: A
A dead-letter policy belongs to the subscription whose delivery attempts are failing. It identifies a separate topic for undeliverable messages and requires the Pub/Sub service account to have forwarding permissions. The configured delivery-attempt threshold is approximate rather than an exact processing count. Retry backoff changes the delay between attempts, and retention changes how long messages remain available. Neither establishes forwarding to the separate inspection topic. A filter on another subscription likewise does not create the failed-message forwarding route.
B. Retry backoff delays attempts but does not route exhausted messages to a separate topic.
C. A subscription filter does not forward failed deliveries into a new topic.
D. Retention extends availability; it does not establish the requested dead-letter route.
Domain 1: Designing highly scalable, secure, and reliable cloud-native applications
A Firestore importer creates documents named Customer1, Customer2, and so on at a high rate. The dataset does not require meaningful document identifiers, but write latency rises during import. Which identifier strategy best addresses the documented hotspot risk?
AUse scattered document IDs instead of sequential IDs.
BUse an increasing timestamp as the document identifier.
CContinue sequential IDs but increase their numeric width.
DPrefix every sequential ID with the same constant tenant name.
Show answer
Answer: A
Firestore advises against monotonically increasing document IDs because sequential identifiers can create hotspots that affect latency. Scattered identifiers address that distribution problem when the application does not need a meaningful ordered ID. Padding the number or adding the same prefix changes representation but preserves the adjacent sequence. A timestamp also retains a monotonically increasing pattern, so it does not resolve the documented cause of the concentrated writes in this import.
B. An increasing timestamp is another monotonically increasing identifier rather than a scattered key. See https://cloud.google.com/firestore/native/docs/best-practices.
C. Padding does not change the sequential ordering of the identifiers. See https://cloud.google.com/firestore/native/docs/best-practices.
D. A constant prefix leaves the imported identifiers adjacent within the same sequential range. See https://cloud.google.com/firestore/native/docs/best-practices.
Integration tests must reach a database that is accessible only through a private network. The team needs managed build workers with network customization for that dependency. Which Cloud Build execution option is appropriate?
AIncrease the test connection timeout without adding connectivity.
BUse the unchanged default pool for the private-only target.
CExpose the test database publicly to keep the default pool unchanged.
DA private pool configured to reach the private network.
Show answer
Answer: D
Cloud Build private pools provide dedicated workers with greater customization, including access to resources in a private network. They are the documented execution option matching this dependency boundary. The scenario supplies no private-network connectivity in that environment. Public exposure violates the requirement that the dependency remain private-network-only. Waiting longer cannot create the missing network path to the private database. Network reachability is the deciding requirement.
A. Waiting longer cannot create the missing network path to the private database.
B. The scenario supplies no private-network connectivity in that environment.
C. Public exposure violates the requirement that the dependency remain private-network-only.