View Full Google Professional Cloud Developer Exam Dumps and Practice Test Dumps.
Question 301
Which Cloud Run setting determines whether CPU is allocated only while a request is being processed or more continuously?
- CPU allocation
- Maximum instances
- Ingress setting
- Revision tag
Correct Answer: 1
Explanation
Cloud Run provides CPU allocation settings that control when CPU resources are available to a container. Request-based CPU allocation is appropriate for many request-driven applications because CPU is primarily available while requests are being processed. Other workloads may benefit from CPU being available outside request processing, depending on the application design and supported configuration. Developers should select the allocation model according to background processing requirements and application behavior. CPU allocation is separate from memory, concurrency, and instance limits. Understanding this setting helps prevent unexpected behavior when applications perform work outside the direct request lifecycle.
Question 302
A developer wants to test a new Cloud Run revision using a dedicated URL without directing production traffic to it. What should be used?
- Minimum instances
- Revision tag
- Maximum instances
- Service account key
Correct Answer: 2
Explanation
Cloud Run revision tags can provide a stable URL associated with a particular revision. This allows developers to test or validate a newly deployed version independently before changing production traffic allocation. A tagged revision can be accessed directly while the service’s normal traffic continues to another revision. This approach is useful for smoke testing, acceptance testing, and controlled validation. Revision tags do not themselves move production traffic. Developers should still apply appropriate authentication and access controls to the testing endpoint, particularly when the revision contains unreleased application functionality or accesses production-connected resources.
Question 303
A Cloud Run Job contains independent tasks that can safely execute at the same time. Which configuration can improve throughput?
- Request timeout
- Service ingress
- Task parallelism
- Revision traffic
Correct Answer: 3
Explanation
Cloud Run Jobs support task parallelism, allowing multiple tasks from a job execution to run concurrently. When tasks are independent and the underlying dependencies can handle additional load, increasing parallelism can reduce total execution time. Developers should determine an appropriate level based on available resources, external service quotas, database capacity, and the characteristics of each task. Parallel execution should not be enabled without considering shared resources or ordering requirements. Task parallelism is different from Cloud Run service request concurrency because it controls simultaneous job tasks rather than the number of requests handled by an individual service container.
Question 304
A Cloud Run Job task repeatedly fails. Which job setting controls how many times a failed task may be retried?
- Maximum instances
- Task timeout
- Retry count
- Traffic allocation
Correct Answer: 3
Explanation
Cloud Run Jobs provide task retry configuration so failed tasks can be attempted again. A retry count helps determine how many additional attempts are permitted when a task does not complete successfully. This is useful for transient failures such as temporary dependency problems, but developers should make task operations idempotent whenever retries could repeat side effects. Excessive retries can increase execution time and resource consumption. Retry configuration should therefore reflect the application’s failure characteristics and recovery strategy. Developers should also use logging and monitoring to investigate persistent failures rather than relying on retries alone.
Question 305
Which Google Cloud service can orchestrate multiple HTTP-based or Google Cloud API operations as a defined workflow?
- Cloud Workflows
- Cloud Storage
- Artifact Registry
- Cloud Profiler
Correct Answer: 1
Explanation
Cloud Workflows is designed to coordinate multiple services and API operations through a defined workflow. A workflow can execute steps sequentially, make decisions, perform parallel operations, and handle errors according to its configuration. This is useful when application logic spans several managed services and the developer wants orchestration outside the individual application containers. Workflows can also authenticate calls to Google Cloud APIs using appropriate identities. By separating orchestration from application code, developers can simplify service implementations and make multi-step business processes easier to monitor, maintain, and modify.
Question 306
A workflow contains several operations that should run simultaneously before later steps continue. Which Workflows construct supports this requirement?
- Variables
- Parallel steps
- Substitution variables
- Revision tags
Correct Answer: 2
Explanation
Cloud Workflows supports parallel execution for independent workflow branches. Parallel steps allow multiple operations to run concurrently rather than waiting for one operation to finish before starting another. After the parallel branches complete according to the workflow’s configuration, subsequent steps can continue. This can reduce overall workflow duration when operations have no dependency on one another. Developers should identify genuinely independent operations before using parallel execution and consider service quotas, failure behavior, and shared resources. Parallelism should not be used when later operations require the output of an earlier branch before they can safely execute.
Question 307
A developer wants reusable logic to be called from several locations within the same Workflows definition. What should be created?
- Subworkflow
- Cloud Storage bucket
- Pub/Sub topic
- Monitoring dashboard
Correct Answer: 1
Explanation
A Workflows subworkflow allows developers to define reusable workflow logic that can be invoked from multiple places within a workflow. This helps reduce duplication when the same sequence of operations or processing logic is needed more than once. Parameters can be used to provide different inputs to the reusable logic. Subworkflows are particularly helpful for organizing larger workflow definitions into smaller, understandable components. They do not create a separate deployed service; instead, they provide a structured way to reuse logic within the workflow definition. This improves maintainability and makes complex orchestration easier to understand.
Question 308
A Workflows step may fail because an external API temporarily returns an error. Which mechanism can handle the failure within the workflow definition?
- Cloud Storage lifecycle rule
- Try/except error handling
- BigQuery clustering
- Artifact cleanup policy
Correct Answer: 2
Explanation
Cloud Workflows provides error-handling constructs that allow developers to catch and respond to failures from workflow steps. Try and except logic can be used when an operation may fail and the workflow needs to perform an alternative action, record information, or transform the failure into a controlled outcome. A finally-style cleanup step can also be useful when certain actions should occur regardless of success or failure. Developers should distinguish recoverable errors from permanent failures and avoid blindly suppressing exceptions. Explicit error handling makes workflows more predictable when external APIs or dependent services experience temporary problems.
Question 309
A Cloud Tasks queue should invoke a protected Cloud Run endpoint using an identity token. Which authentication configuration is appropriate?
- OIDC token
- Public anonymous invocation
- Static password
- Storage signed URL
Correct Answer: 1
Explanation
Cloud Tasks can use OpenID Connect authentication when dispatching tasks to an authenticated HTTP endpoint. The task configuration can specify a service account whose identity is represented in the generated token. The receiving Cloud Run service can then authorize that identity through appropriate IAM permissions. This avoids embedding long-lived credentials in task payloads or application configuration. Developers should ensure that the service account has only the required invocation permission and that the receiving service validates the authenticated request. OIDC authentication is particularly useful for securely connecting asynchronous task processing with protected HTTP services.
Question 310
When configuring OIDC authentication for a Cloud Tasks request, what value helps the receiving service identify the intended token audience?
- Queue location
- OIDC audience
- Task name
- Retry count
Correct Answer: 2
Explanation
The OIDC audience identifies the intended recipient of an identity token generated for a Cloud Tasks request. Developers can configure the audience value so that the receiving service can validate that the token was intended for the expected endpoint or application. This provides an additional security check beyond simply confirming that a token is valid. The audience should match the application’s authentication expectations and should not be confused with the task name, queue location, or retry configuration. Correct audience configuration is especially important when one identity is authorized to invoke multiple services and the application needs to distinguish the intended recipient.
Question 311
A Firestore application needs to query the same field across collections that share a common collection ID. Which query capability is designed for this?
- Collection group query
- Storage lifecycle rule
- Pub/Sub snapshot
- Cloud SQL replica
Correct Answer: 1
Explanation
Firestore collection group queries allow an application to query documents across all collections with the same collection ID, regardless of where those collections appear in the document hierarchy. This is useful when related subcollections are repeated under many parent documents. For example, applications can maintain similarly named subcollections under different users or organizations and query them collectively when appropriate indexes and security rules support the operation. Developers should design the data model carefully because collection group queries have specific indexing and security considerations. They provide a way to retrieve related documents without requiring every document to reside in one top-level collection.
Question 312
A Firestore application wants documents to be automatically deleted after a specified period. Which capability can support this requirement?
- Cloud Scheduler
- Firestore TTL policy
- BigQuery clustering
- Cloud Run revision tags
Correct Answer: 2
Explanation
Firestore TTL policies can automatically delete documents based on a designated timestamp field. This is useful for temporary records such as sessions, cached information, short-lived events, or application data that should expire after a defined period. The application must maintain the timestamp field used by the TTL policy. Developers should remember that TTL deletion is managed asynchronously rather than functioning as an exact real-time timer. Applications should therefore not depend on deletion occurring at an exact second. TTL is primarily a convenient lifecycle mechanism for automatically removing data that no longer needs to remain in Firestore.
Question 313
A Cloud SQL database has many read operations and is approaching the capacity of its primary instance. Which architecture can help distribute read workloads?
- Read replica
- Firestore transaction
- Pub/Sub subscription
- Cloud Run revision
Correct Answer: 1
Explanation
Cloud SQL read replicas can provide additional database instances that replicate data from a primary instance and serve read traffic. Applications can direct suitable read-only operations to replicas while continuing to send writes to the primary database. This can help distribute read workloads and reduce pressure on the primary instance when the workload is strongly read-oriented. Developers must account for replication lag because a replica may not always contain the most recent committed data. Read replicas are therefore not appropriate for every consistency requirement. Application routing should distinguish operations that require current primary data from those suitable for replicated reads.
Question 314
Which Cloud Spanner design consideration helps distribute database workload across multiple nodes?
- Randomly changing table names
- Choosing a suitable primary key
- Disabling transactions
- Storing all data in one row
Correct Answer: 2
Explanation
Cloud Spanner uses primary keys to organize and distribute rows, so primary-key design is an important consideration for workload distribution. A poorly selected key can create hotspots when many writes target a narrow key range. Developers should design keys according to access patterns and distribution requirements rather than relying on monotonically increasing values without considering their impact. Good schema design helps Spanner distribute work effectively while maintaining the required query behavior. Primary keys also influence how records are identified and accessed. Therefore, key selection should be considered early when designing a Spanner schema for scalable applications.
Question 315
A BigQuery workload repeatedly executes the same expensive aggregation over data that changes infrequently. Which feature can reduce repeated computation?
- Materialized view
- Cloud Tasks queue
- Cloud Run Job
- Secret version
Correct Answer: 1
Explanation
BigQuery materialized views can precompute and store the results of supported queries so that repeated workloads may avoid recomputing the full underlying aggregation each time. They are useful for frequently executed analytical queries where the source data changes in ways supported by materialized-view maintenance. Developers should evaluate whether the query pattern and data characteristics are suitable before adopting this approach. Materialized views differ from ordinary logical views because they maintain stored results to improve performance. They can be especially valuable for dashboards or recurring analytical workloads that repeatedly perform expensive aggregations over large datasets.
Question 316
A BigQuery application wants to avoid executing a query when its estimated cost or data processed is too high. Which capability can help inspect the query before execution?
- Dry run
- Cloud Scheduler
- Cloud Armor
- Object versioning
Correct Answer: 1
Explanation
A BigQuery dry run validates a query and provides an estimate of the amount of data that would be processed without actually executing the query. Developers can use this capability to identify potentially expensive queries before allowing them to run. This is useful in applications that generate queries dynamically or in development workflows where resource consumption needs to be controlled. A dry run does not provide the query’s actual result because execution does not occur. Developers can combine estimated processing information with application policies to reject, modify, or request approval for queries that exceed defined resource thresholds.
Question 317
Which GKE capability automatically adjusts the number of Pod replicas based on observed resource utilization?
- Vertical Pod Autoscaler
- PersistentVolumeClaim
- Kubernetes Service
- ConfigMap
Correct Answer: 1
Explanation
The Vertical Pod Autoscaler can recommend or adjust resource requests for Kubernetes Pods based on observed usage, depending on its configured mode. It focuses on CPU and memory resource requests rather than simply increasing the number of replicas. Developers should distinguish this behavior from the Horizontal Pod Autoscaler, which changes replica counts based on configured metrics. VPA can help applications whose resource requirements are difficult to estimate accurately. However, changing resource requests may cause Pods to restart in applicable configurations, so developers should consider availability and workload behavior before enabling automatic updates in production environments.
Question 318
A Kubernetes deployment should place replicas on different failure domains when possible to improve resilience. Which scheduling feature can express this requirement?
- Pod affinity and anti-affinity
- ConfigMap
- Service account token
- Container image tag
Correct Answer: 1
Explanation
Kubernetes pod affinity and anti-affinity rules influence where Pods are scheduled relative to other Pods or topology domains. Anti-affinity can help distribute replicas so they are less likely to share the same failure domain, depending on the configured topology and cluster resources. This can improve resilience when individual nodes or zones become unavailable. Developers should configure these rules according to the application’s availability requirements and ensure sufficient cluster capacity exists to satisfy scheduling constraints. Affinity rules influence scheduling decisions; they do not themselves guarantee that every Pod will always remain available during infrastructure failures.
Question 319
A Kubernetes workload performs a finite batch operation and should not remain running after completion. Which Kubernetes resource is appropriate?
- Service
- Deployment
- Job
- ConfigMap
Correct Answer: 3
Explanation
A Kubernetes Job is designed to run one or more Pods until a specified task completes successfully. It is appropriate for finite batch processing, data migrations, one-time processing, and other workloads that should terminate after completion. The Job controller manages Pod creation and can retry failed Pods according to its configuration. This differs from a Deployment, which is intended to maintain a desired number of continuously running Pods. Developers should select a Job when completion is the desired final state rather than ongoing availability. For recurring scheduled batch operations, a Kubernetes CronJob can create Jobs according to a schedule.
Question 320
A Cloud Build pipeline should produce evidence that artifacts were built by the expected build process. Which supply-chain capability is relevant?
- Build provenance
- Firestore TTL
- BigQuery partitioning
- Cloud Run concurrency
Correct Answer: 1
Explanation
Build provenance provides information about how and where an artifact was produced, helping organizations establish trust in their software supply chain. Cloud Build can integrate with Google Cloud software supply-chain capabilities that provide provenance information associated with builds and artifacts. Developers and security teams can use this information to support policies about artifact origins and build processes. Provenance does not replace vulnerability scanning or runtime security controls; instead, it addresses the traceability of software creation. Maintaining trustworthy build metadata can help organizations verify that deployed artifacts originated from expected automated build processes.