View Full Google Professional Cloud Developer Exam Dumps and Practice Test Dumps.
Question 321
A Cloud Run application performs background work between incoming requests and requires CPU during those periods. Which configuration should the developer consider?
- Request-based CPU allocation
- CPU always allocated
- Maximum instance limit
- Revision tagging
Correct Answer: 2
Explanation
Cloud Run supports CPU allocation models that determine when CPU resources are available to a container. When an application needs to perform background processing outside the active request lifecycle, an always-allocated CPU configuration may be appropriate. This differs from request-based allocation, where CPU availability is primarily associated with request processing. Developers should carefully evaluate whether background work is suitable for the service architecture and ensure that scaling, instance lifecycle, and application behavior are understood. CPU allocation should not be confused with memory allocation or maximum instance settings, which address different resource and scaling characteristics.
Question 322
A Cloud Run service should never create more than 20 instances because its downstream system has limited capacity. Which setting addresses this requirement?
- Maximum instances
- Minimum instances
- Container port
- Revision tag
Correct Answer: 1
Explanation
The Cloud Run maximum instance setting establishes an upper bound on the number of instances that can serve a service. Limiting instances can protect constrained downstream systems from receiving excessive concurrent traffic during sudden demand increases. Developers should select the limit based on measured backend capacity, expected request concurrency, and application performance. A maximum instance setting may cause requests to wait or experience capacity-related behavior when demand exceeds the configured limit. It should therefore be tested under realistic load. Minimum instances serve a different purpose by maintaining warm instances to reduce startup latency.
Question 323
A developer wants to verify a new Cloud Run revision using a unique URL while keeping production traffic on the current revision. What should be configured?
- Service account
- Revision tag
- Maximum instances
- Request timeout
Correct Answer: 2
Explanation
A Cloud Run revision tag can provide a URL that targets a particular revision independently of normal service traffic allocation. This allows developers to deploy a new version and perform validation before moving production traffic to it. Testing through a revision-specific URL can support smoke tests, integration checks, or manual verification. Production traffic can remain directed to the existing revision during this process. Developers should ensure that the tagged revision has appropriate authentication and access controls. Revision tags are therefore useful for controlled testing without requiring the new revision to become the active production destination.
Question 324
A Cloud Run Job must process 1,000 independent records, and each task should handle a separate portion of the data. Which approach is suitable?
- Increase service concurrency only
- Use Cloud Storage classes
- Configure multiple job tasks
- Add a Pub/Sub topic without tasks
Correct Answer: 3
Explanation
Cloud Run Jobs support multiple tasks, allowing a batch workload to divide processing across separate task executions. When records can be partitioned independently, developers can assign different portions of the workload to different tasks and use task parallelism to process them concurrently. The application should determine which records each task handles and avoid overlapping work unless duplicate processing is intentional and safely managed. Developers should also consider downstream limits when selecting the number of simultaneous tasks. Multiple job tasks are different from request concurrency in Cloud Run services because they represent separate batch execution units.
Question 325
A scheduled Cloud Run Job should start automatically every night at 2:00 AM. Which service can provide the scheduling mechanism?
- Cloud Scheduler
- Cloud Profiler
- Cloud Trace
- Artifact Registry
Correct Answer: 1
Explanation
Cloud Scheduler can trigger scheduled operations at defined times or intervals and can be used to initiate Cloud Run Jobs through supported integrations and invocation mechanisms. This is useful for recurring batch workloads such as nightly reports, cleanup operations, data processing, and periodic synchronization. Developers should configure authentication appropriately when the target requires authorization and ensure that the invoking identity has the necessary permissions. The schedule should use the intended timezone and account for daylight-saving considerations where relevant. Cloud Scheduler handles timing, while the Cloud Run Job performs the actual containerized batch processing.
Question 326
A Pub/Sub consumer may receive the same event more than once. Which application design principle helps prevent duplicate business effects?
- Idempotent processing
- Larger message size
- Longer topic names
- More subscription filters
Correct Answer: 1
Explanation
Idempotent processing allows an application to safely process the same logical event multiple times without producing unintended duplicate business effects. Pub/Sub applications should account for possible redelivery, particularly when acknowledgment does not occur successfully or processing fails. A developer can use a unique event identifier and maintain suitable state so that already completed operations are recognized. The exact implementation depends on the business operation and data store. Idempotency is especially important for payments, order creation, inventory updates, and other operations where repeating a side effect can cause incorrect application state.
Question 327
A Pub/Sub topic contains billing, inventory, and notification events. Different consumers need different subsets without creating separate topics. What should be used?
- Subscription filters
- Message retention removal
- Ordering keys only
- Publisher authentication only
Correct Answer: 1
Explanation
Pub/Sub subscription filters allow individual subscriptions to receive only messages that match specified attributes. A single topic can therefore contain several event categories while different subscriptions independently select the messages relevant to their consumers. Publishers can add attributes such as event type when publishing messages. This design avoids requiring a separate topic for every consumer category when the event stream can reasonably be shared. Developers should ensure that filtering attributes are consistently included and correctly formatted. Subscription filters control which messages are delivered to a subscriber; they do not replace application-level authorization or business validation.
Question 328
A developer needs a Pub/Sub subscription to process messages again from a previously preserved subscription state. Which feature can provide that starting point?
- Snapshot
- Cloud Storage lifecycle
- API Gateway quota
- Firestore TTL
Correct Answer: 1
Explanation
A Pub/Sub subscription snapshot preserves the acknowledgment state of a subscription at a particular point in time. Developers can use a snapshot as a reference when they need to seek a subscription and replay eligible messages from that preserved state. This can be valuable after discovering a consumer defect or when testing updated processing logic against previously received messages. Message retention requirements still apply because replay depends on messages remaining available. Developers should also make consumers safe for repeated delivery. Snapshots preserve subscription state; they do not create an independent permanent copy of every message.
Question 329
A Firestore application needs to retrieve documents from every subcollection named comments, regardless of which parent document contains them. Which query type should be used?
- Collection group query
- Transaction query
- Bucket query
- Replica query
Correct Answer: 1
Explanation
A Firestore collection group query searches across all collections and subcollections that share the specified collection ID. Therefore, if multiple parent documents contain subcollections named comments, a collection group query can retrieve matching documents across those locations. This capability is useful when the data model intentionally stores related records as repeated subcollections. Developers should configure required indexes and ensure that Firestore Security Rules properly authorize the resulting access pattern. Collection group queries differ from ordinary collection queries, which target one specific collection path. Choosing the appropriate query type depends on how documents are structured within the Firestore hierarchy.
Question 330
A Firestore application stores temporary session records that should eventually disappear automatically. Which feature can automate their removal?
- Firestore TTL policy
- Cloud Run revision
- BigQuery clustering
- Pub/Sub ordering
Correct Answer: 1
Explanation
Firestore TTL policies can automatically remove documents when the timestamp in a designated field reaches the configured expiration condition. This is useful for temporary sessions, short-lived application records, cached state, and other data that does not need to remain indefinitely. Developers should populate the TTL field consistently and understand that deletion occurs asynchronously rather than at an exact guaranteed instant. Applications should therefore not depend on immediate deletion at the precise expiration timestamp. TTL policies reduce the need to build custom cleanup processes and can help keep temporary data from accumulating unnecessarily.
Question 331
A Cloud SQL application requires a separate database instance to serve read-only queries while the primary handles writes. Which capability supports this architecture?
- Read replica
- Cloud Tasks queue
- Firestore collection group
- Cloud Run revision
Correct Answer: 1
Explanation
Cloud SQL read replicas provide replicated database instances that can serve read workloads while the primary instance continues handling writes. This architecture can help distribute read-heavy workloads and reduce pressure on the primary database. Developers must account for replication lag because a replica may temporarily be behind the primary. Therefore, operations requiring the latest committed state may need to remain on the primary instance. Application routing should explicitly distinguish read-only operations that can tolerate replication lag from operations requiring strong freshness. Read replicas are a scaling mechanism for suitable read workloads, not a general replacement for database high availability.
Question 332
A developer wants a BigQuery query to reuse precomputed results from a frequently executed aggregation. Which feature is relevant?
- Materialized view
- Cloud Scheduler
- Secret Manager
- Cloud Tasks
Correct Answer: 1
Explanation
A BigQuery materialized view stores precomputed results for supported query patterns and can reduce the amount of computation required for repeated analytical workloads. It is particularly useful when applications or dashboards repeatedly perform aggregations over data that changes in a way compatible with materialized-view maintenance. Developers should evaluate query patterns and freshness requirements before choosing this approach. Materialized views differ from standard views because they maintain stored results rather than simply storing a query definition. They can improve performance and potentially reduce resource consumption for suitable workloads, while ordinary views remain useful for logical query abstraction.
Question 333
A developer wants to validate a BigQuery query and estimate processed data without actually running it. Which capability should be used?
- Dry run
- Clustering
- Partition expiration
- Storage lifecycle
Correct Answer: 1
Explanation
A BigQuery dry run allows developers to validate a query and obtain an estimate of the data that would be processed without executing the query and producing its normal results. This can be useful when applications construct queries dynamically and need to apply cost or processing limits before execution. Developers can use the estimate as part of a validation workflow that rejects unexpectedly expensive queries. A dry run does not replace query optimization because it only evaluates the planned operation. Partitioning, clustering, and appropriate filters can still be used to reduce the amount of data processed by the eventual query.
Question 334
Which GKE capability can adjust Pod resource requests based on observed CPU and memory usage?
- Vertical Pod Autoscaler
- Horizontal Pod Autoscaler
- Kubernetes Service
- NetworkPolicy
Correct Answer: 1
Explanation
Vertical Pod Autoscaler focuses on CPU and memory resource requests for Kubernetes Pods. Based on observed workload behavior, it can provide recommendations or adjust resource requests depending on its configured operating mode. This can help when developers have difficulty estimating appropriate resource requirements manually. It differs from Horizontal Pod Autoscaler, which primarily changes the number of replicas based on selected metrics. Developers should understand the operational impact of automatic resource changes because applicable VPA modes may restart Pods. Proper configuration and testing are important to ensure that resource recommendations improve efficiency without causing undesirable availability or scheduling behavior.
Question 335
A GKE application requires replicas to be distributed across different zones when possible. Which scheduling concept can express this placement preference?
- Pod anti-affinity
- ConfigMap
- Service port
- PersistentVolumeClaim
Correct Answer: 1
Explanation
Pod anti-affinity can influence Kubernetes scheduling so that selected Pods are placed away from other matching Pods according to defined topology constraints. When configured with suitable topology information, this can help distribute replicas across nodes or zones and reduce the impact of a single infrastructure failure. Developers should distinguish hard scheduling requirements from preferred placement rules because strict constraints can prevent Pods from being scheduled when sufficient capacity is unavailable. Anti-affinity should be designed alongside cluster capacity, availability goals, and workload requirements. It provides scheduling guidance or constraints rather than an absolute guarantee of uninterrupted application availability.
Question 336
A Kubernetes workload must execute once for each batch processing run and finish after successful completion. Which resource is appropriate?
- Deployment
- Service
- Job
- ConfigMap
Correct Answer: 3
Explanation
A Kubernetes Job manages Pods that perform a finite task and tracks completion. Once the required work has successfully finished, the Job reaches its completed state rather than maintaining continuously running replicas. Jobs are appropriate for database migrations, batch calculations, data processing, and other finite workloads. Kubernetes can also retry failed Pods according to the Job’s configuration. Developers should use a Deployment for long-running applications that need a desired number of continuously available replicas. If the batch operation needs to run repeatedly on a schedule, a CronJob can be used to create Jobs automatically.
Question 337
A developer wants to store build outputs in a managed repository that supports container images and other software packages. Which service is appropriate?
- Artifact Registry
- Cloud Trace
- Cloud Scheduler
- Firestore
Correct Answer: 1
Explanation
Artifact Registry provides managed repositories for storing and managing software artifacts such as container images and supported package formats. It integrates with Google Cloud development and deployment workflows, allowing build systems to publish artifacts that can later be deployed by application platforms. Developers can configure repository permissions to control who or what identity may upload or retrieve artifacts. Artifact Registry is distinct from Cloud Storage, which provides general object storage. Using a dedicated artifact repository also helps establish clearer separation between application build outputs and unrelated files, making software delivery workflows easier to manage.
Question 338
A Cloud Build configuration must use different environment-specific values while keeping one reusable configuration file. Which feature is designed for this?
- Build substitutions
- Cloud Logging exclusions
- Firestore transactions
- BigQuery snapshots
Correct Answer: 1
Explanation
Cloud Build substitutions provide parameterized values that can be supplied or changed when a build executes. This allows one build configuration to support multiple environments without duplicating the entire configuration for development, staging, and production. Developers can use substitutions for values such as project identifiers, deployment targets, image names, or environment labels. Sensitive credentials should not be placed into substitutions as a substitute for secure secret management. Reusable build configurations simplify maintenance because changes to build logic can be made in one place while environment-specific values remain configurable.
Question 339
A Cloud Storage bucket contains temporary objects that should be deleted automatically after a defined age. Which configuration provides this behavior?
- Lifecycle rule
- Bucket label
- Storage location
- Object name prefix alone
Correct Answer: 1
Explanation
Cloud Storage lifecycle rules allow developers to define automatic actions for objects when specified conditions are met. An age-based deletion rule can remove temporary objects after they have existed for a defined period. This is useful for generated reports, intermediate processing files, caches, and other data with limited retention requirements. Developers should carefully verify lifecycle conditions because automated deletion can be irreversible once the applicable retention conditions are satisfied. Lifecycle rules reduce the need for application code to perform routine cleanup and can be combined with other storage-management capabilities to establish appropriate data-retention behavior.
Question 340
A production application needs to determine which request caused a downstream service call and correlate activity across multiple services. Which observability approach is most appropriate?
- Separate log files with no identifiers
- Distributed tracing with trace context
- Increasing container memory
- Changing the Cloud Run service name
Correct Answer: 2
Explanation
Distributed tracing with trace context allows related operations to be connected across service boundaries. When an incoming request generates calls to multiple downstream services, propagated trace information can help developers follow the request path and identify where latency or failures occur. Correlated logs can provide additional application-specific details alongside trace information. Developers should ensure that supported tracing context is propagated correctly between services and that sensitive data is not placed into trace metadata. This approach is especially valuable for microservices because examining each service independently may not reveal the complete path taken by an individual request.